diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-20 16:52:14 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-20 16:52:14 +0000 |
commit | c44abb127b3567d7f371d84e767641649fa2137c (patch) | |
tree | 9f47bc03b5dbf0151996e470421bdbb03b3d4390 /Lib/test/support.py | |
parent | 1b6372a1d1e0b68e6b29e02fd1af8c721aeaa52b (diff) | |
download | cpython-git-c44abb127b3567d7f371d84e767641649fa2137c.tar.gz |
Workaround issue #8611 in test_undecodable_code() of test_sys
Write test.support.workaroundIssue8611() function so it will be easier to
remove this workaround from all tests.
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r-- | Lib/test/support.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index d0e84c72ab..814d06198e 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1277,3 +1277,11 @@ def strip_python_stderr(stderr): """ stderr = re.sub(br"\[\d+ refs\]\r?\n?$", b"", stderr).strip() return stderr + +def workaroundIssue8611(): + try: + sys.executable.encode('ascii') + except UnicodeEncodeError: + raise unittest.SkipTest( + "Issue #8611: Python doesn't support ascii locale encoding " + "with an non-ascii path") |