summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cmd_line.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-11-06 22:23:43 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-11-06 22:23:43 (GMT)
commit8b219b2936d767bf6c6c17618db3a7b22fc2e865 (patch)
tree717f4aa9f9aa97ffb916269572869b55018c831c /Lib/test/test_cmd_line.py
parentdf1d940c7c59398717a1b63d8681f26aeae48b87 (diff)
downloadcpython-8b219b2936d767bf6c6c17618db3a7b22fc2e865.zip
cpython-8b219b2936d767bf6c6c17618db3a7b22fc2e865.tar.gz
cpython-8b219b2936d767bf6c6c17618db3a7b22fc2e865.tar.bz2
Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII
These constants are used to test functions with non-ASCII data, especially filenames.
Diffstat (limited to 'Lib/test/test_cmd_line.py')
-rw-r--r--Lib/test/test_cmd_line.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 4b39115..bd8a767 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -93,15 +93,15 @@ class CmdLineTest(unittest.TestCase):
# All good if execution is successful
assert_python_ok('-c', 'pass')
- @unittest.skipIf(sys.getfilesystemencoding() == 'ascii',
- 'need a filesystem encoding different than ASCII')
+ @unittest.skipUnless(test.support.FS_NONASCII, 'need support.FS_NONASCII')
def test_non_ascii(self):
# Test handling of non-ascii data
if test.support.verbose:
import locale
print('locale encoding = %s, filesystem encoding = %s'
% (locale.getpreferredencoding(), sys.getfilesystemencoding()))
- command = "assert(ord('\xe9') == 0xe9)"
+ command = ("assert(ord(%r) == %s)"
+ % (test.support.FS_NONASCII, ord(test.support.FS_NONASCII)))
assert_python_ok('-c', command)
# On Windows, pass bytes to subprocess doesn't test how Python decodes the