diff options
Diffstat (limited to 'Lib/test/test_csv.py')
-rw-r--r-- | Lib/test/test_csv.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index 0ad77ef09c..8511a5ae97 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -852,6 +852,8 @@ Stonecutters Seafood and Chop House, Lemont, IL, 12/19/02, Week Back ''' sample5 = "aaa\tbbb\r\nAAA\t\r\nBBB\t\r\n" + sample6 = "a|b|c\r\nd|e|f\r\n" + sample7 = "'a'|'b'|'c'\r\n'd'|e|f\r\n" def test_has_header(self): sniffer = csv.Sniffer() @@ -882,6 +884,11 @@ Stonecutters Seafood and Chop House, Lemont, IL, 12/19/02, Week Back self.assertEqual(dialect.delimiter, ";") dialect = sniffer.sniff(self.sample5) self.assertEqual(dialect.delimiter, "\t") + dialect = sniffer.sniff(self.sample6) + self.assertEqual(dialect.delimiter, "|") + dialect = sniffer.sniff(self.sample7) + self.assertEqual(dialect.delimiter, "|") + self.assertEqual(dialect.quotechar, "'") if not hasattr(sys, "gettotalrefcount"): if test_support.verbose: print "*** skipping leakage tests ***" |