Commit 0f41acb0 authored by Berker Peksag's avatar Berker Peksag

Issue #22076: Minor grammar fix.

Patch by Martin Matusiak.
parent 0efea322
...@@ -783,7 +783,7 @@ class TestDialectValidity(unittest.TestCase): ...@@ -783,7 +783,7 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm: with self.assertRaises(csv.Error) as cm:
mydialect() mydialect()
self.assertEqual(str(cm.exception), self.assertEqual(str(cm.exception),
'"quotechar" must be an 1-character string') '"quotechar" must be a 1-character string')
mydialect.quotechar = 4 mydialect.quotechar = 4
with self.assertRaises(csv.Error) as cm: with self.assertRaises(csv.Error) as cm:
...@@ -806,13 +806,13 @@ class TestDialectValidity(unittest.TestCase): ...@@ -806,13 +806,13 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm: with self.assertRaises(csv.Error) as cm:
mydialect() mydialect()
self.assertEqual(str(cm.exception), self.assertEqual(str(cm.exception),
'"delimiter" must be an 1-character string') '"delimiter" must be a 1-character string')
mydialect.delimiter = "" mydialect.delimiter = ""
with self.assertRaises(csv.Error) as cm: with self.assertRaises(csv.Error) as cm:
mydialect() mydialect()
self.assertEqual(str(cm.exception), self.assertEqual(str(cm.exception),
'"delimiter" must be an 1-character string') '"delimiter" must be a 1-character string')
mydialect.delimiter = b"," mydialect.delimiter = b","
with self.assertRaises(csv.Error) as cm: with self.assertRaises(csv.Error) as cm:
......
...@@ -248,7 +248,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt) ...@@ -248,7 +248,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt)
len = PyUnicode_GetLength(src); len = PyUnicode_GetLength(src);
if (len > 1) { if (len > 1) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"\"%s\" must be an 1-character string", "\"%s\" must be a 1-character string",
name); name);
return -1; return -1;
} }
...@@ -432,7 +432,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) ...@@ -432,7 +432,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
goto err; goto err;
if (self->delimiter == 0) { if (self->delimiter == 0) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"\"delimiter\" must be an 1-character string"); "\"delimiter\" must be a 1-character string");
goto err; goto err;
} }
if (quotechar == Py_None && quoting == NULL) if (quotechar == Py_None && quoting == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment