diff options
author | Skip Montanaro <skip@pobox.com> | 2003-05-06 15:56:05 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2003-05-06 15:56:05 (GMT) |
commit | 1a56665e39e4ee3cb29519a1cb58f2ab077622f1 (patch) | |
tree | c5a94f0e470e32f0b0a80cd7980113b20057f8e3 /Lib/test/test_csv.py | |
parent | 446ad71569a94bf43c0e4cd331875d162e9f1e14 (diff) | |
download | cpython-1a56665e39e4ee3cb29519a1cb58f2ab077622f1.zip cpython-1a56665e39e4ee3cb29519a1cb58f2ab077622f1.tar.gz cpython-1a56665e39e4ee3cb29519a1cb58f2ab077622f1.tar.bz2 |
add not-yet-supported Unicode test just so it doesn't get lost.
Diffstat (limited to 'Lib/test/test_csv.py')
-rw-r--r-- | Lib/test/test_csv.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index 18f8851..c0ad645 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -1,3 +1,4 @@ +# -*- coding: iso-8859-1 -*- # Copyright (C) 2001,2002 Python Software Foundation # csv package unit tests @@ -640,6 +641,25 @@ else: # if writer leaks during write, last delta should be 5 or more self.assertEqual(delta < 5, True) +# commented out for now - csv module doesn't yet support Unicode +if 0: + from StringIO import StringIO + import csv + + class TestUnicode(unittest.TestCase): + def test_unicode_read(self): + import codecs + f = codecs.EncodedFile(StringIO("Martin von Löwis," + "Marc André Lemburg," + "Guido van Rossum," + "François Pinard\r\n"), + data_encoding='iso-8859-1') + reader = csv.reader(f) + self.assertEqual(list(reader), [[u"Martin von Löwis", + u"Marc André Lemburg", + u"Guido van Rossum", + u"François Pinardn"]]) + def test_main(): mod = sys.modules[__name__] test_support.run_unittest( |