Skip to content

Commit 656b7a3

Browse files
tomasr8Eclips4
andauthored
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>
1 parent c066bf5 commit 656b7a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_csv.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,12 @@ class mydialect(csv.Dialect):
11031103
mydialect.quoting = None
11041104
self.assertRaises(csv.Error, mydialect)
11051105

1106+
mydialect.quoting = 42
1107+
with self.assertRaises(csv.Error) as cm:
1108+
mydialect()
1109+
self.assertEqual(str(cm.exception),
1110+
'bad "quoting" value')
1111+
11061112
mydialect.doublequote = True
11071113
mydialect.quoting = csv.QUOTE_ALL
11081114
mydialect.quotechar = '"'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy