mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
[3.13] gh-121982: `csv
: Add a test case for invalid
quoting
` constant. (GH-121983) (#124926)
gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH-121983)
Test invalid quoting constant
(cherry picked from commit 656b7a3c83
)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
aa6cf9b402
commit
ff0ab0eb3f
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue