summaryrefslogtreecommitdiff
path: root/Lib/test/test_unicode_file.py
diff options
context:
space:
mode:
authorMark Hammond <mhammond@skippinet.com.au>2003-12-03 22:16:47 +0000
committerMark Hammond <mhammond@skippinet.com.au>2003-12-03 22:16:47 +0000
commit8cc5a45318d585a949e67da64241c0992820fe1b (patch)
tree0a09d468ed24a89d87a7d4cba28ff4a33c7ea882 /Lib/test/test_unicode_file.py
parentb16414374b3c778378c81a021eb1230ae8c5d818 (diff)
downloadcpython-8cc5a45318d585a949e67da64241c0992820fe1b.tar.gz
Fix test_unicode_file errors on platforms without Unicode file support,
by setting TESTFN_UNICODE_UNENCODEABLE on these platforms. test_unicode_file only attempts to use the name for testing if not None.
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r--Lib/test/test_unicode_file.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py
index 467b78ec16..fbca88b221 100644
--- a/Lib/test/test_unicode_file.py
+++ b/Lib/test/test_unicode_file.py
@@ -140,7 +140,8 @@ class TestUnicodeFiles(unittest.TestCase):
def test_single_files(self):
self._test_single(TESTFN_ENCODED)
self._test_single(TESTFN_UNICODE)
- self._test_single(TESTFN_UNICODE_UNENCODEABLE)
+ if TESTFN_UNICODE_UNENCODEABLE is not None:
+ self._test_single(TESTFN_UNICODE_UNENCODEABLE)
def test_equivalent_files(self):
self._test_equivalent(TESTFN_ENCODED, TESTFN_UNICODE)
@@ -156,9 +157,10 @@ class TestUnicodeFiles(unittest.TestCase):
self._do_directory(TESTFN_UNICODE+ext, TESTFN_ENCODED+ext, os.getcwdu)
self._do_directory(TESTFN_UNICODE+ext, TESTFN_UNICODE+ext, os.getcwdu)
# Our directory name that can't use a non-unicode name.
- self._do_directory(TESTFN_UNICODE_UNENCODEABLE+ext,
- TESTFN_UNICODE_UNENCODEABLE+ext,
- os.getcwdu)
+ if TESTFN_UNICODE_UNENCODEABLE is not None:
+ self._do_directory(TESTFN_UNICODE_UNENCODEABLE+ext,
+ TESTFN_UNICODE_UNENCODEABLE+ext,
+ os.getcwdu)
def test_main():
suite = unittest.TestSuite()