From c44abb127b3567d7f371d84e767641649fa2137c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 20 Aug 2010 16:52:14 +0000 Subject: 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. --- Lib/test/support.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test/support.py') 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") -- cgit v1.2.1