From e466217ab954c5a53fc2e0b78876385362120900 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 19 Feb 2006 09:51:27 +0000 Subject: Patch #1337756: fileinput now accepts Unicode filenames. --- Lib/test/test_fileinput.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Lib/test/test_fileinput.py') diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py index 3a82c7c71f..285573cc8e 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) -- cgit v1.2.1