mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Logic for determining whether skipping test_pep277 is expected: whether
ths "should be" skipped depends on os.path.supports_unicode_filenames, not really on the platform. Fiddled the expected-skip constructor appropriately.
This commit is contained in:
parent
cfac1d4a18
commit
2a182dbf3f
1 changed files with 8 additions and 1 deletions
|
@ -495,6 +495,11 @@ def printlist(x, width=70, indent=4):
|
||||||
|
|
||||||
# Map sys.platform to a string containing the basenames of tests
|
# Map sys.platform to a string containing the basenames of tests
|
||||||
# expected to be skipped on that platform.
|
# expected to be skipped on that platform.
|
||||||
|
#
|
||||||
|
# Special cases:
|
||||||
|
# test_pep277
|
||||||
|
# The _ExpectedSkips constructor adds this to the set of expected
|
||||||
|
# skips if not os.path.supports_unicode_filenames.
|
||||||
|
|
||||||
_expectations = {
|
_expectations = {
|
||||||
'win32':
|
'win32':
|
||||||
|
@ -543,7 +548,6 @@ _expectations = {
|
||||||
test_largefile
|
test_largefile
|
||||||
test_nis
|
test_nis
|
||||||
test_ntpath
|
test_ntpath
|
||||||
test_pep277
|
|
||||||
test_socket_ssl
|
test_socket_ssl
|
||||||
test_socketserver
|
test_socketserver
|
||||||
test_sunaudiodev
|
test_sunaudiodev
|
||||||
|
@ -819,10 +823,13 @@ _expectations = {
|
||||||
|
|
||||||
class _ExpectedSkips:
|
class _ExpectedSkips:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
import os.path
|
||||||
self.valid = False
|
self.valid = False
|
||||||
if sys.platform in _expectations:
|
if sys.platform in _expectations:
|
||||||
s = _expectations[sys.platform]
|
s = _expectations[sys.platform]
|
||||||
self.expected = Set(s.split())
|
self.expected = Set(s.split())
|
||||||
|
if not os.path.supports_unicode_filenames:
|
||||||
|
self.expected.add('test_pep277')
|
||||||
self.valid = True
|
self.valid = True
|
||||||
|
|
||||||
def isvalid(self):
|
def isvalid(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue