summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_csv.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2005-12-28 15:43:50 (GMT)
committerSkip Montanaro <skip@pobox.com>2005-12-28 15:43:50 (GMT)
commitcac7b9d79a95b84d22b92589e43f22f736e54576 (patch)
treedcf9c2486ee817db803c0840021311116383dbaa /Lib/test/test_csv.py
parent2043472c8dbf63c0259b2f84785e4c38504d4db7 (diff)
downloadcpython-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.py4
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 ***"