Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(827)

Unified Diff: Lib/test/test_csv.py

Issue 96202: Support for detection of doublequote property in csv.Sniff Base URL: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 14 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/csv.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Lib/test/test_csv.py
===================================================================
--- Lib/test/test_csv.py (revision 74272)
+++ Lib/test/test_csv.py (working copy)
@@ -891,7 +891,7 @@
'Harry''s':'Arlington Heights':'IL':'2/1/03':'Kimi Hayes'
'Shark City':'Glendale Heights':'IL':'12/28/02':'Prezence'
'Tommy''s Place':'Blue Island':'IL':'12/28/02':'Blue Sunday/White Crow'
-'Stonecutters Seafood and Chop House':'Lemont':'IL':'12/19/02':'Week Back'
+'Stonecutters ''Seafood'' and Chop House':'Lemont':'IL':'12/19/02':'Week Back'
"""
header = '''\
"venue","city","state","date","performers"
@@ -950,6 +950,13 @@
self.assertEqual(dialect.delimiter, "|")
self.assertEqual(dialect.quotechar, "'")
+ def test_doublequote(self):
+ sniffer = csv.Sniffer()
+ dialect = sniffer.sniff(self.header)
+ self.assertFalse(dialect.doublequote)
+ dialect = sniffer.sniff(self.sample2)
+ self.assertTrue(dialect.doublequote)
+
if not hasattr(sys, "gettotalrefcount"):
if test_support.verbose: print "*** skipping leakage tests ***"
else:
« no previous file with comments | « Lib/csv.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b