Skip to content

Commit a861264

Browse files
committed
Fix remaining tests
1 parent 5c22697 commit a861264

File tree

19 files changed

+150
-106
lines changed

19 files changed

+150
-106
lines changed

Lib/test/string_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,8 +1066,6 @@ def test_hash(self):
10661066
hash(b)
10671067
self.assertEqual(hash(a), hash(b))
10681068

1069-
# TODO: RUSTPYTHON
1070-
@unittest.expectedFailure
10711069
def test_capitalize_nonascii(self):
10721070
# check that titlecased chars are lowered correctly
10731071
# \u1ffc is the titlecased char

Lib/test/test_cmd_line_script.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,7 @@ def test_pep_409_verbiage(self):
574574
self.assertTrue(text[1].startswith(' File '))
575575
self.assertTrue(text[3].startswith('NameError'))
576576

577-
# TODO: RUSTPYTHON
578-
@unittest.expectedFailure
577+
@unittest.expectedFailureIf(sys.platform == "linux", "TODO: RUSTPYTHON")
579578
def test_non_ascii(self):
580579
# Mac OS X denies the creation of a file with an invalid UTF-8 name.
581580
# Windows allows creating a name with an arbitrary bytes name, but

Lib/test/test_import/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,8 @@ def exec_module(*args):
13051305
else:
13061306
importlib.SourceLoader.exec_module = old_exec_module
13071307

1308+
# TODO: RUSTPYTHON
1309+
@unittest.expectedFailure
13081310
@unittest.skipUnless(TESTFN_UNENCODABLE, 'need TESTFN_UNENCODABLE')
13091311
def test_unencodable_filename(self):
13101312
# Issue #11619: The Python parser and the import machinery must not

Lib/test/test_json/test_scanstring.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,4 @@ def test_overflow(self):
143143

144144

145145
class TestPyScanstring(TestScanstring, PyTest): pass
146-
# TODO: RUSTPYTHON
147-
class TestPyScanstring(TestScanstring, PyTest):
148-
# TODO: RUSTPYTHON
149-
@unittest.expectedFailure
150-
def test_bad_escapes(self):
151-
super().test_bad_escapes()
152146
class TestCScanstring(TestScanstring, CTest): pass

Lib/test/test_ntpath.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,6 @@ class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase):
10321032
pathmodule = ntpath
10331033
attributes = ['relpath']
10341034

1035-
# TODO: RUSTPYTHON
1036-
if sys.platform == "linux":
1037-
@unittest.expectedFailure
1038-
def test_nonascii_abspath(self):
1039-
super().test_nonascii_abspath()
1040-
10411035
# TODO: RUSTPYTHON
10421036
if sys.platform == "win32":
10431037
# TODO: RUSTPYTHON, ValueError: illegal environment variable name

Lib/test/test_re.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,7 @@ def test_bug_40736(self):
22312231
with self.assertRaisesRegex(TypeError, "got 'type'"):
22322232
re.search("x*", type)
22332233

2234+
@unittest.skip("TODO: RUSTPYTHON: flaky, improve perf")
22342235
@requires_resource('cpu')
22352236
def test_search_anchor_at_beginning(self):
22362237
s = 'x'*10**7

Lib/test/test_socket.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,7 @@ def test_getnameinfo(self):
15781578
# only IP addresses are allowed
15791579
self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0)
15801580

1581+
@unittest.skip("TODO: RUSTPYTHON: flaky on CI?")
15811582
@unittest.skipUnless(support.is_resource_enabled('network'),
15821583
'network is not enabled')
15831584
def test_idna(self):

Lib/test/test_sqlite3/test_types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ def test_too_large_int(self):
9595
row = self.cur.fetchone()
9696
self.assertIsNone(row)
9797

98-
# TODO: RUSTPYTHON
99-
@unittest.expectedFailure
10098
def test_string_with_surrogates(self):
10199
for value in 0xd8ff, 0xdcff:
102100
with self.assertRaises(UnicodeEncodeError):

Lib/test/test_ucn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ def test_cjk_unified_ideographs(self):
102102
self.checkletter("CJK UNIFIED IDEOGRAPH-2B81D", "\U0002B81D")
103103
self.checkletter("CJK UNIFIED IDEOGRAPH-3134A", "\U0003134A")
104104

105-
# TODO: RUSTPYTHON
106-
@unittest.expectedFailure
107105
def test_bmp_characters(self):
108106
for code in range(0x10000):
109107
char = chr(code)

Lib/test/test_unicode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,6 @@ def test_isspace(self):
721721
'\U0001F40D', '\U0001F46F']:
722722
self.assertFalse(ch.isspace(), '{!a} is not space.'.format(ch))
723723

724-
# TODO: RUSTPYTHON
725-
@unittest.expectedFailure
726724
@support.requires_resource('cpu')
727725
def test_isspace_invariant(self):
728726
for codepoint in range(sys.maxunicode + 1):

0 commit comments

Comments
 (0)