mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
add not-yet-supported Unicode test just so it doesn't get lost.
This commit is contained in:
parent
446ad71569
commit
1a56665e39
1 changed files with 20 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: iso-8859-1 -*-
|
||||||
# Copyright (C) 2001,2002 Python Software Foundation
|
# Copyright (C) 2001,2002 Python Software Foundation
|
||||||
# csv package unit tests
|
# csv package unit tests
|
||||||
|
|
||||||
|
|
@ -640,6 +641,25 @@ else:
|
||||||
# if writer leaks during write, last delta should be 5 or more
|
# if writer leaks during write, last delta should be 5 or more
|
||||||
self.assertEqual(delta < 5, True)
|
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():
|
def test_main():
|
||||||
mod = sys.modules[__name__]
|
mod = sys.modules[__name__]
|
||||||
test_support.run_unittest(
|
test_support.run_unittest(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue