summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode_file.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-10-02 18:55:37 (GMT)
committerGuido van Rossum <guido@python.org>2008-10-02 18:55:37 (GMT)
commitf0af3e30db9475ab68bcb1f1ce0b5581e214df76 (patch)
tree71efbc67686d96e8c8a81dd97c75c419adf36657 /Lib/test/test_unicode_file.py
parentfefeca53eebe8665c08ac0c041639ada3c9f9446 (diff)
downloadcpython-f0af3e30db9475ab68bcb1f1ce0b5581e214df76.zip
cpython-f0af3e30db9475ab68bcb1f1ce0b5581e214df76.tar.gz
cpython-f0af3e30db9475ab68bcb1f1ce0b5581e214df76.tar.bz2
Issue #3187: Better support for "undecodable" filenames. Code by Victor
Stinner, with small tweaks by GvR.
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r--Lib/test/test_unicode_file.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py
index cc670db..9caadd8 100644
--- a/Lib/test/test_unicode_file.py
+++ b/Lib/test/test_unicode_file.py
@@ -90,7 +90,7 @@ class TestUnicodeFiles(unittest.TestCase):
os.unlink(filename1 + ".new")
def _do_directory(self, make_name, chdir_name, encoded):
- cwd = os.getcwd()
+ cwd = os.getcwdb()
if os.path.isdir(make_name):
os.rmdir(make_name)
os.mkdir(make_name)
@@ -98,10 +98,10 @@ class TestUnicodeFiles(unittest.TestCase):
os.chdir(chdir_name)
try:
if not encoded:
- cwd_result = os.getcwdu()
+ cwd_result = os.getcwd()
name_result = make_name
else:
- cwd_result = os.getcwd().decode(TESTFN_ENCODING)
+ cwd_result = os.getcwdb().decode(TESTFN_ENCODING)
name_result = make_name.decode(TESTFN_ENCODING)
cwd_result = unicodedata.normalize("NFD", cwd_result)