mirror of https://github.com/python/cpython
gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (#121983)
Test invalid quoting constant Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
c066bf5535
commit
656b7a3c83
|
@ -1103,6 +1103,12 @@ class TestDialectValidity(unittest.TestCase):
|
|||
mydialect.quoting = None
|
||||
self.assertRaises(csv.Error, mydialect)
|
||||
|
||||
mydialect.quoting = 42
|
||||
with self.assertRaises(csv.Error) as cm:
|
||||
mydialect()
|
||||
self.assertEqual(str(cm.exception),
|
||||
'bad "quoting" value')
|
||||
|
||||
mydialect.doublequote = True
|
||||
mydialect.quoting = csv.QUOTE_ALL
|
||||
mydialect.quotechar = '"'
|
||||
|
|
Loading…
Reference in New Issue