summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileinput.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fileinput.py')
-rw-r--r--Lib/test/test_fileinput.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py
index f3a7841..301769e 100644
--- a/Lib/test/test_fileinput.py
+++ b/Lib/test/test_fileinput.py
@@ -162,7 +162,10 @@ if verbose:
print "15. Unicode filenames"
try:
t1 = writeTmp(1, ["A\nB"])
- fi = FileInput(files=unicode(t1, sys.getfilesystemencoding()))
+ encoding = sys.getfilesystemencoding()
+ if encoding is None:
+ encoding = 'ascii'
+ fi = FileInput(files=unicode(t1, encoding))
lines = list(fi)
verify(lines == ["A\n", "B"])
finally: