summaryrefslogtreecommitdiff
path: root/Lib/test/test_genericpath.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-10-31 19:02:24 -0400
committerBenjamin Peterson <benjamin@python.org>2012-10-31 19:02:24 -0400
commitd87963ecf6f0f07f346306c3b34a16f8f97de61c (patch)
tree74a34000b251a61e564572ffce375b9c8b2d61dd /Lib/test/test_genericpath.py
parentda58c3d81ab93127093d741a95671b0c30b9437f (diff)
parentfce2a6e0c026641cd73d12acde521d12f41ad3ff (diff)
downloadcpython-git-d87963ecf6f0f07f346306c3b34a16f8f97de61c.tar.gz
merge heads
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r--Lib/test/test_genericpath.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index 3eadd5893c..600ffc03d9 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -311,14 +311,10 @@ class CommonTest(GenericTest):
@unittest.skipIf(sys.platform == 'darwin',
"Mac OS X denies the creation of a directory with an invalid utf8 name")
def test_nonascii_abspath(self):
- name = b'\xe7w\xf0'
- if sys.platform == 'win32':
- try:
- os.fsdecode(name)
- except UnicodeDecodeError:
- self.skipTest("the filename %a is not decodable "
- "from the ANSI code page %s"
- % (name, sys.getfilesystemencoding()))
+ if support.TESTFN_UNDECODABLE:
+ name = support.TESTFN_UNDECODABLE
+ else:
+ name = b'a\xffb\xe7w\xf0'
# Test non-ASCII, non-UTF8 bytes in the path.
with warnings.catch_warnings():