Skip to content

Commit 22322fa

Browse files
authored
Merge pull request RustPython#2506 from fanninpm/more-expected-failures
Unskip more tests (follow-up from RustPython#2443)
2 parents 6b0c0ca + 4ba5829 commit 22322fa

35 files changed

+2661
-208
lines changed

Lib/test/randv2_32.pck

+633
Large diffs are not rendered by default.

Lib/test/randv2_64.pck

+633
Large diffs are not rendered by default.

Lib/test/randv3.pck

+633
Large diffs are not rendered by default.

Lib/test/seq_tests.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ def test_pickle(self):
416416
self.assertEqual(lst2, lst)
417417
self.assertNotEqual(id(lst2), id(lst))
418418

419-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'test.support' has no attribute 'check_free_after_iterating'")
419+
# TODO: RUSTPYTHON
420+
@unittest.expectedFailure
420421
def test_free_after_iterating(self):
421422
support.check_free_after_iterating(self, iter, self.type2test)
422423
support.check_free_after_iterating(self, reversed, self.type2test)

Lib/test/test_array.py

+224-2
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ def test_tofromstring(self):
471471
nb_warnings += 1
472472
self.assertEqual(len(r), nb_warnings)
473473

474-
@unittest.skip("TODO: RUSTPYTHON, OverflowError: Python int too large to convert to Rust i8")
475474
def test_tofrombytes(self):
476475
a = array.array(self.typecode, 2*self.example)
477476
b = array.array(self.typecode)
@@ -1131,7 +1130,6 @@ def test_setitem(self):
11311130
a = array.array(self.typecode, self.example)
11321131
self.assertRaises(TypeError, a.__setitem__, 0, self.example[:2])
11331132

1134-
@unittest.skip("TODO: RUSTPYTHON, ValueError: bad typecode")
11351133
class UnicodeTest(StringTest, unittest.TestCase):
11361134
typecode = 'u'
11371135
example = '\x01\u263a\x00\ufeff'
@@ -1140,6 +1138,173 @@ class UnicodeTest(StringTest, unittest.TestCase):
11401138
outside = str('\x33')
11411139
minitemsize = 2
11421140

1141+
# TODO: RUSTPYTHON
1142+
@unittest.expectedFailure
1143+
def test_add(self):
1144+
super().test_add()
1145+
1146+
# TODO: RUSTPYTHON
1147+
@unittest.expectedFailure
1148+
def test_buffer(self):
1149+
super().test_buffer()
1150+
1151+
# TODO: RUSTPYTHON
1152+
@unittest.expectedFailure
1153+
def test_buffer_info(self):
1154+
super().test_buffer_info()
1155+
1156+
# TODO: RUSTPYTHON
1157+
@unittest.expectedFailure
1158+
def test_byteswap(self):
1159+
super().test_byteswap()
1160+
1161+
# TODO: RUSTPYTHON
1162+
@unittest.expectedFailure
1163+
def test_cmp(self):
1164+
super().test_cmp()
1165+
1166+
# TODO: RUSTPYTHON
1167+
@unittest.expectedFailure
1168+
def test_constructor(self):
1169+
super().test_constructor()
1170+
1171+
# TODO: RUSTPYTHON
1172+
@unittest.expectedFailure
1173+
def test_constructor_with_iterable_argument(self):
1174+
super().test_constructor_with_iterable_argument()
1175+
1176+
# TODO: RUSTPYTHON
1177+
@unittest.expectedFailure
1178+
def test_copy(self):
1179+
super().test_copy()
1180+
1181+
# TODO: RUSTPYTHON
1182+
@unittest.expectedFailure
1183+
def test_count(self):
1184+
super().test_count()
1185+
1186+
# TODO: RUSTPYTHON
1187+
@unittest.expectedFailure
1188+
def test_coveritertraverse(self):
1189+
super().test_coveritertraverse()
1190+
1191+
# TODO: RUSTPYTHON
1192+
@unittest.expectedFailure
1193+
def test_deepcopy(self):
1194+
super().test_deepcopy()
1195+
1196+
# TODO: RUSTPYTHON
1197+
@unittest.expectedFailure
1198+
def test_delitem(self):
1199+
super().test_delitem()
1200+
1201+
# TODO: RUSTPYTHON
1202+
@unittest.expectedFailure
1203+
def test_exhausted_iterator(self):
1204+
super().test_exhausted_iterator()
1205+
1206+
# TODO: RUSTPYTHON
1207+
@unittest.expectedFailure
1208+
def test_extend(self):
1209+
super().test_extend()
1210+
1211+
# TODO: RUSTPYTHON
1212+
@unittest.expectedFailure
1213+
def test_extended_getslice(self):
1214+
super().test_extended_getslice()
1215+
1216+
# TODO: RUSTPYTHON
1217+
@unittest.expectedFailure
1218+
def test_extended_set_del_slice(self):
1219+
super().test_extended_set_del_slice()
1220+
1221+
# TODO: RUSTPYTHON
1222+
@unittest.expectedFailure
1223+
def test_fromarray(self):
1224+
super().test_fromarray()
1225+
1226+
# TODO: RUSTPYTHON
1227+
@unittest.expectedFailure
1228+
def test_getitem(self):
1229+
super().test_getitem()
1230+
1231+
# TODO: RUSTPYTHON
1232+
@unittest.expectedFailure
1233+
def test_getslice(self):
1234+
super().test_getslice()
1235+
1236+
# TODO: RUSTPYTHON
1237+
@unittest.expectedFailure
1238+
def test_iadd(self):
1239+
super().test_iadd()
1240+
1241+
# TODO: RUSTPYTHON
1242+
@unittest.expectedFailure
1243+
def test_imul(self):
1244+
super().test_imul()
1245+
1246+
# TODO: RUSTPYTHON
1247+
@unittest.expectedFailure
1248+
def test_index(self):
1249+
super().test_index()
1250+
1251+
# TODO: RUSTPYTHON
1252+
@unittest.expectedFailure
1253+
def test_insert(self):
1254+
super().test_insert()
1255+
1256+
# TODO: RUSTPYTHON
1257+
@unittest.expectedFailure
1258+
def test_len(self):
1259+
super().test_len()
1260+
1261+
# TODO: RUSTPYTHON
1262+
@unittest.expectedFailure
1263+
def test_mul(self):
1264+
super().test_mul()
1265+
1266+
# TODO: RUSTPYTHON
1267+
@unittest.expectedFailure
1268+
def test_pop(self):
1269+
super().test_pop()
1270+
1271+
# TODO: RUSTPYTHON
1272+
@unittest.expectedFailure
1273+
def test_remove(self):
1274+
super().test_remove()
1275+
1276+
# TODO: RUSTPYTHON
1277+
@unittest.expectedFailure
1278+
def test_repr(self):
1279+
super().test_repr()
1280+
1281+
# TODO: RUSTPYTHON
1282+
@unittest.expectedFailure
1283+
def test_reverse(self):
1284+
super().test_reverse()
1285+
1286+
# TODO: RUSTPYTHON
1287+
@unittest.expectedFailure
1288+
def test_setslice(self):
1289+
super().test_setslice()
1290+
1291+
# TODO: RUSTPYTHON
1292+
@unittest.expectedFailure
1293+
def test_str(self):
1294+
super().test_str()
1295+
1296+
# TODO: RUSTPYTHON
1297+
@unittest.expectedFailure
1298+
def test_tofrombytes(self):
1299+
super().test_tofrombytes()
1300+
1301+
# TODO: RUSTPYTHON
1302+
@unittest.expectedFailure
1303+
def test_tofromlist(self):
1304+
super().test_tofromlist()
1305+
1306+
# TODO: RUSTPYTHON
1307+
@unittest.expectedFailure
11431308
def test_unicode(self):
11441309
self.assertRaises(TypeError, array.array, 'b', 'foo')
11451310

@@ -1160,6 +1325,8 @@ def test_unicode(self):
11601325

11611326
self.assertRaises(TypeError, a.fromunicode)
11621327

1328+
# TODO: RUSTPYTHON
1329+
@unittest.expectedFailure
11631330
def test_issue17223(self):
11641331
# this used to crash
11651332
if sizeof_wchar == 4:
@@ -1345,6 +1512,11 @@ class ByteTest(SignedNumberTest, unittest.TestCase):
13451512
typecode = 'b'
13461513
minitemsize = 1
13471514

1515+
# TODO: RUSTPYTHON
1516+
@unittest.expectedFailure
1517+
def test_tofrombytes(self):
1518+
super().test_tofrombytes()
1519+
13481520
class UnsignedByteTest(UnsignedNumberTest, unittest.TestCase):
13491521
typecode = 'B'
13501522
minitemsize = 1
@@ -1353,34 +1525,74 @@ class ShortTest(SignedNumberTest, unittest.TestCase):
13531525
typecode = 'h'
13541526
minitemsize = 2
13551527

1528+
# TODO: RUSTPYTHON
1529+
@unittest.expectedFailure
1530+
def test_tofrombytes(self):
1531+
super().test_tofrombytes()
1532+
13561533
class UnsignedShortTest(UnsignedNumberTest, unittest.TestCase):
13571534
typecode = 'H'
13581535
minitemsize = 2
13591536

1537+
# TODO: RUSTPYTHON
1538+
@unittest.expectedFailure
1539+
def test_tofrombytes(self):
1540+
super().test_tofrombytes()
1541+
13601542
class IntTest(SignedNumberTest, unittest.TestCase):
13611543
typecode = 'i'
13621544
minitemsize = 2
13631545

1546+
# TODO: RUSTPYTHON
1547+
@unittest.expectedFailure
1548+
def test_tofrombytes(self):
1549+
super().test_tofrombytes()
1550+
13641551
class UnsignedIntTest(UnsignedNumberTest, unittest.TestCase):
13651552
typecode = 'I'
13661553
minitemsize = 2
13671554

1555+
# TODO: RUSTPYTHON
1556+
@unittest.expectedFailure
1557+
def test_tofrombytes(self):
1558+
super().test_tofrombytes()
1559+
13681560
class LongTest(SignedNumberTest, unittest.TestCase):
13691561
typecode = 'l'
13701562
minitemsize = 4
13711563

1564+
# TODO: RUSTPYTHON
1565+
@unittest.expectedFailure
1566+
def test_tofrombytes(self):
1567+
super().test_tofrombytes()
1568+
13721569
class UnsignedLongTest(UnsignedNumberTest, unittest.TestCase):
13731570
typecode = 'L'
13741571
minitemsize = 4
13751572

1573+
# TODO: RUSTPYTHON
1574+
@unittest.expectedFailure
1575+
def test_tofrombytes(self):
1576+
super().test_tofrombytes()
1577+
13761578
class LongLongTest(SignedNumberTest, unittest.TestCase):
13771579
typecode = 'q'
13781580
minitemsize = 8
13791581

1582+
# TODO: RUSTPYTHON
1583+
@unittest.expectedFailure
1584+
def test_tofrombytes(self):
1585+
super().test_tofrombytes()
1586+
13801587
class UnsignedLongLongTest(UnsignedNumberTest, unittest.TestCase):
13811588
typecode = 'Q'
13821589
minitemsize = 8
13831590

1591+
# TODO: RUSTPYTHON
1592+
@unittest.expectedFailure
1593+
def test_tofrombytes(self):
1594+
super().test_tofrombytes()
1595+
13841596
class FPTest(NumberTest):
13851597
example = [-42.0, 0, 42, 1e5, -1e10]
13861598
smallerexample = [-42.0, 0, 42, 1e5, -2e10]
@@ -1420,10 +1632,20 @@ class FloatTest(FPTest, unittest.TestCase):
14201632
typecode = 'f'
14211633
minitemsize = 4
14221634

1635+
# TODO: RUSTPYTHON
1636+
@unittest.expectedFailure
1637+
def test_tofrombytes(self):
1638+
super().test_tofrombytes()
1639+
14231640
class DoubleTest(FPTest, unittest.TestCase):
14241641
typecode = 'd'
14251642
minitemsize = 8
14261643

1644+
# TODO: RUSTPYTHON
1645+
@unittest.expectedFailure
1646+
def test_tofrombytes(self):
1647+
super().test_tofrombytes()
1648+
14271649
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'capacity overflow'")
14281650
def test_alloc_overflow(self):
14291651
from sys import maxsize

Lib/test/test_importlib/extension/test_loader.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def setUp(self):
2222
def load_module(self, fullname):
2323
return self.loader.load_module(fullname)
2424

25-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: 'NoneType' object has no attribute 'rpartition'")
25+
# TODO: RUSTPYTHON
26+
@unittest.expectedFailure
2627
def test_load_module_API(self):
2728
# Test the default argument for load_module().
2829
self.loader.load_module()
@@ -59,7 +60,8 @@ def test_module(self):
5960
# No extension module in a package available for testing.
6061
test_lacking_parent = None
6162

62-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: 'NoneType' object has no attribute 'rpartition'")
63+
# TODO: RUSTPYTHON
64+
@unittest.expectedFailure
6365
def test_module_reuse(self):
6466
with util.uncache(util.EXTENSIONS.name):
6567
module1 = self.load_module(util.EXTENSIONS.name)
@@ -75,7 +77,8 @@ def test_unloadable(self):
7577
self.load_module(name)
7678
self.assertEqual(cm.exception.name, name)
7779

78-
@unittest.skip("TODO: RUSTPYTHON, AttributeError: 'NoneType' object has no attribute 'rpartition'")
80+
# TODO: RUSTPYTHON
81+
@unittest.expectedFailure
7982
def test_is_package(self):
8083
self.assertFalse(self.loader.is_package(util.EXTENSIONS.name))
8184
for suffix in self.machinery.EXTENSION_SUFFIXES:

Lib/test/test_importlib/frozen/test_loader.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def test_module(self):
3434
self.assertEqual(output, 'Hello world!\n')
3535
self.assertTrue(hasattr(module, '__spec__'))
3636

37-
@unittest.skip("TODO: RUSTPYTHON, ImportError: '__phello__' is not a frozen module")
37+
# TODO: RUSTPYTHON
38+
@unittest.expectedFailure
3839
def test_package(self):
3940
name = '__phello__'
4041
module, output = self.exec_module(name)
@@ -47,7 +48,8 @@ def test_package(self):
4748
expected=value))
4849
self.assertEqual(output, 'Hello world!\n')
4950

50-
@unittest.skip("TODO: RUSTPYTHON, ImportError: '__phello__.spam' is not a frozen module")
51+
# TODO: RUSTPYTHON
52+
@unittest.expectedFailure
5153
def test_lacking_parent(self):
5254
name = '__phello__.spam'
5355
with util.uncache('__phello__'):
@@ -107,7 +109,8 @@ def test_module(self):
107109
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
108110
self.assertFalse(hasattr(module, '__file__'))
109111

110-
@unittest.skip("TODO: RUSTPYTHON, ImportError: '__phello__' is not a frozen module")
112+
# TODO: RUSTPYTHON
113+
@unittest.expectedFailure
111114
def test_package(self):
112115
with util.uncache('__phello__'), captured_stdout() as stdout:
113116
with warnings.catch_warnings():
@@ -126,7 +129,8 @@ def test_package(self):
126129
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
127130
self.assertFalse(hasattr(module, '__file__'))
128131

129-
@unittest.skip("TODO: RUSTPYTHON, ImportError: '__phello__.spam' is not a frozen module")
132+
# TODO: RUSTPYTHON
133+
@unittest.expectedFailure
130134
def test_lacking_parent(self):
131135
with util.uncache('__phello__', '__phello__.spam'), \
132136
captured_stdout() as stdout:
@@ -204,7 +208,8 @@ def test_get_source(self):
204208
result = self.machinery.FrozenImporter.get_source('__hello__')
205209
self.assertIsNone(result)
206210

207-
@unittest.skip("TODO: RUSTPYTHON, ImportError: '__phello__' is not a frozen module")
211+
# TODO: RUSTPYTHON
212+
@unittest.expectedFailure
208213
def test_is_package(self):
209214
# Should be able to tell what is a package.
210215
test_for = (('__hello__', False), ('__phello__', True),

0 commit comments

Comments
 (0)