diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-07-30 01:34:07 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-07-30 01:34:07 +0000 |
commit | b4d45a1f62f21d689dd282cfe451ebd81e495b38 (patch) | |
tree | ee64f0c2a7b137a4504c7815446c753f7cb190fc /Lib/test/test_unicode_file.py | |
parent | d3f8c485b1a99a5b7e78a60271baaac23e4cd7f2 (diff) | |
download | cpython-b4d45a1f62f21d689dd282cfe451ebd81e495b38.tar.gz |
Don't try to use a bytes sequence for file paths. Also force equivalency tests
to be between str8 and str.
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r-- | Lib/test/test_unicode_file.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py index 9cf48df816..69d99aa0d8 100644 --- a/Lib/test/test_unicode_file.py +++ b/Lib/test/test_unicode_file.py @@ -8,7 +8,8 @@ import unittest from test.test_support import run_unittest, TestSkipped, TESTFN_UNICODE from test.test_support import TESTFN_ENCODING, TESTFN_UNICODE_UNENCODEABLE try: - TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING) + TESTFN_ENCODED = TESTFN_UNICODE + TESTFN_UNICODE.encode(TESTFN_ENCODING) except (UnicodeError, TypeError): # Either the file system encoding is None, or the file name # cannot be encoded in the file system encoding. @@ -76,6 +77,7 @@ class TestUnicodeFiles(unittest.TestCase): # Do as many "equivalancy' tests as we can - ie, check that although we # have different types for the filename, they refer to the same file. def _do_equivilent(self, filename1, filename2): + filename2 = str8(filename2) # Note we only check "filename1 against filename2" - we don't bother # checking "filename2 against 1", as we assume we are called again with # the args reversed. |