Issue #22076: Minor grammar fix.

Patch by Martin Matusiak.
This commit is contained in:
Berker Peksag 2014-07-27 23:22:34 +03:00
parent 0efea322a9
commit 0f41acb0ea
2 changed files with 5 additions and 5 deletions

View File

@ -783,7 +783,7 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
'"quotechar" must be an 1-character string')
'"quotechar" must be a 1-character string')
mydialect.quotechar = 4
with self.assertRaises(csv.Error) as cm:
@ -806,13 +806,13 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
'"delimiter" must be an 1-character string')
'"delimiter" must be a 1-character string')
mydialect.delimiter = ""
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
'"delimiter" must be an 1-character string')
'"delimiter" must be a 1-character string')
mydialect.delimiter = b","
with self.assertRaises(csv.Error) as cm:

View File

@ -248,7 +248,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt)
len = PyUnicode_GetLength(src);
if (len > 1) {
PyErr_Format(PyExc_TypeError,
"\"%s\" must be an 1-character string",
"\"%s\" must be a 1-character string",
name);
return -1;
}
@ -432,7 +432,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
goto err;
if (self->delimiter == 0) {
PyErr_SetString(PyExc_TypeError,
"\"delimiter\" must be an 1-character string");
"\"delimiter\" must be a 1-character string");
goto err;
}
if (quotechar == Py_None && quoting == NULL)