diff options
author | Skip Montanaro <skip@pobox.com> | 2005-12-28 15:43:50 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2005-12-28 15:43:50 (GMT) |
commit | cac7b9d79a95b84d22b92589e43f22f736e54576 (patch) | |
tree | dcf9c2486ee817db803c0840021311116383dbaa /Lib/test/test_csv.py | |
parent | 2043472c8dbf63c0259b2f84785e4c38504d4db7 (diff) | |
download | cpython-cac7b9d79a95b84d22b92589e43f22f736e54576.zip cpython-cac7b9d79a95b84d22b92589e43f22f736e54576.tar.gz cpython-cac7b9d79a95b84d22b92589e43f22f736e54576.tar.bz2 |
backport Sniffer class fix (rev 41838)
Diffstat (limited to 'Lib/test/test_csv.py')
-rw-r--r-- | Lib/test/test_csv.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index aaebabc..ad85724 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -738,6 +738,8 @@ Stonecutters Seafood and Chop House, Lemont, IL, 12/19/02, Week Back 47483648;43.0;170;abc;def ''' + sample5 = "aaa\tbbb\r\nAAA\t\r\nBBB\t\r\n" + def test_has_header(self): sniffer = csv.Sniffer() self.assertEqual(sniffer.has_header(self.sample1), False) @@ -765,6 +767,8 @@ Stonecutters Seafood and Chop House, Lemont, IL, 12/19/02, Week Back self.assertEqual(dialect.delimiter, "/") dialect = sniffer.sniff(self.sample4) self.assertEqual(dialect.delimiter, ";") + dialect = sniffer.sniff(self.sample5) + self.assertEqual(dialect.delimiter, "\t") if not hasattr(sys, "gettotalrefcount"): if test_support.verbose: print "*** skipping leakage tests ***" |