summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-02-19 09:51:27 (GMT)
committerGeorg Brandl <georg@python.org>2006-02-19 09:51:27 (GMT)
commite466217ab954c5a53fc2e0b78876385362120900 (patch)
treef325d50baeb8488a113024c10494d50874d3f4ec /Lib/test
parente9b1949f70ff985e17e1ce5592b59073d101bbab (diff)
downloadcpython-e466217ab954c5a53fc2e0b78876385362120900.zip
cpython-e466217ab954c5a53fc2e0b78876385362120900.tar.gz
cpython-e466217ab954c5a53fc2e0b78876385362120900.tar.bz2
Patch #1337756: fileinput now accepts Unicode filenames.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_fileinput.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py
index 3a82c7c..285573c 100644
--- a/Lib/test/test_fileinput.py
+++ b/Lib/test/test_fileinput.py
@@ -157,3 +157,13 @@ try:
verify(fi.lineno() == 6)
finally:
remove_tempfiles(t1, t2)
+
+if verbose:
+ print "15. Unicode filenames"
+try:
+ t1 = writeTmp(1, ["A\nB"])
+ fi = FileInput(files=unicode(t1, sys.getfilesystemencoding()))
+ lines = list(fi)
+ verify(lines == ["A\n", "B"])
+finally:
+ remove_tempfiles(t1)