test_sys: Remove workaround #8611
It looks like it is no more needed: Python 3.2 is slowly able to support non-ascii paths with an ascii locale.
This commit is contained in:
parent
052a04d34a
commit
d24fc5d7c4
|
@ -1327,11 +1327,3 @@ def strip_python_stderr(stderr):
|
||||||
"""
|
"""
|
||||||
stderr = re.sub(br"\[\d+ refs\]\r?\n?$", b"", stderr).strip()
|
stderr = re.sub(br"\[\d+ refs\]\r?\n?$", b"", stderr).strip()
|
||||||
return stderr
|
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")
|
|
||||||
|
|
|
@ -502,9 +502,6 @@ class SysModuleTest(unittest.TestCase):
|
||||||
@unittest.skipIf(sys.platform == 'win32',
|
@unittest.skipIf(sys.platform == 'win32',
|
||||||
'Windows has a native unicode API')
|
'Windows has a native unicode API')
|
||||||
def test_undecodable_code(self):
|
def test_undecodable_code(self):
|
||||||
# Raise SkipTest() if sys.executable is not encodable to ascii
|
|
||||||
test.support.workaroundIssue8611()
|
|
||||||
|
|
||||||
undecodable = b"\xff"
|
undecodable = b"\xff"
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
# Use C locale to get ascii for the locale encoding
|
# Use C locale to get ascii for the locale encoding
|
||||||
|
|
Loading…
Reference in New Issue