Skip to content

Commit 3d27f16

Browse files
committed
adjust failing markers for test_{builtin,decimal,float,range}
1 parent 33690be commit 3d27f16

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

Lib/test/test_builtin.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def check_iter_pickle(self, it, seq, proto):
153153
it = pickle.loads(d)
154154
self.assertEqual(list(it), seq[1:])
155155

156+
# TODO: RUSTPYTHON
157+
@unittest.expectedFailure
156158
def test_import(self):
157159
__import__('sys')
158160
__import__('time')
@@ -376,6 +378,8 @@ def f(): """doc"""
376378
rv = ns['f']()
377379
self.assertEqual(rv, tuple(expected))
378380

381+
# TODO: RUSTPYTHON
382+
@unittest.expectedFailure
379383
def test_compile_top_level_await_no_coro(self):
380384
"""Make sure top level non-await codes get the correct coroutine flags"""
381385
modes = ('single', 'exec')
@@ -397,6 +401,8 @@ def test_compile_top_level_await_no_coro(self):
397401
msg=f"source={source} mode={mode}")
398402

399403

404+
# TODO: RUSTPYTHON
405+
@unittest.expectedFailure
400406
def test_compile_top_level_await(self):
401407
"""Test whether code some top level await can be compiled.
402408
@@ -455,6 +461,8 @@ async def arange(n):
455461
finally:
456462
asyncio.set_event_loop_policy(policy)
457463

464+
# TODO: RUSTPYTHON
465+
@unittest.expectedFailure
458466
def test_compile_top_level_await_invalid_cases(self):
459467
# helper function just to check we can run top=level async-for
460468
async def arange(n):
@@ -493,6 +501,8 @@ async def arange(n):
493501
asyncio.set_event_loop_policy(policy)
494502

495503

504+
# TODO: RUSTPYTHON
505+
@unittest.expectedFailure
496506
def test_compile_async_generator(self):
497507
"""
498508
With the PyCF_ALLOW_TOP_LEVEL_AWAIT flag added in 3.8, we want to
@@ -1017,6 +1027,8 @@ def test_map_pickle(self):
10171027
m2 = map(map_char, "Is this the real life?")
10181028
self.check_iter_pickle(m1, list(m2), proto)
10191029

1030+
# TODO: RUSTPYTHON
1031+
@unittest.expectedFailure
10201032
def test_max(self):
10211033
self.assertEqual(max('123123'), '3')
10221034
self.assertEqual(max(1, 2, 3), 3)
@@ -1076,6 +1088,8 @@ def __getitem__(self, index):
10761088
self.assertEqual(max(data, key=f),
10771089
sorted(reversed(data), key=f)[-1])
10781090

1091+
# TODO: RUSTPYTHON
1092+
@unittest.expectedFailure
10791093
def test_min(self):
10801094
self.assertEqual(min('123123'), '1')
10811095
self.assertEqual(min(1, 2, 3), 1)
@@ -1218,6 +1232,7 @@ def test_open_default_encoding(self):
12181232
os.environ.clear()
12191233
os.environ.update(old_environ)
12201234

1235+
@unittest.skipIf(sys.platform == 'win32', 'TODO: RUSTPYTHON Windows')
12211236
def test_open_non_inheritable(self):
12221237
fileobj = open(__file__, encoding="utf-8")
12231238
with fileobj:
@@ -1868,6 +1883,8 @@ def test_construct_singletons(self):
18681883
self.assertRaises(TypeError, tp, 1, 2)
18691884
self.assertRaises(TypeError, tp, a=1, b=2)
18701885

1886+
# TODO: RUSTPYTHON
1887+
@unittest.expectedFailure
18711888
def test_warning_notimplemented(self):
18721889
# Issue #35712: NotImplemented is a sentinel value that should never
18731890
# be evaluated in a boolean context (virtually all such use cases

Lib/test/test_decimal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,8 @@ def hashit(d):
18531853
x = 1100 ** 1248
18541854
self.assertEqual(hashit(Decimal(x)), hashit(x))
18551855

1856+
# TODO: RUSTPYTHON
1857+
@unittest.expectedFailure
18561858
def test_hash_method_nan(self):
18571859
Decimal = self.decimal.Decimal
18581860
self.assertRaises(TypeError, hash, Decimal('sNaN'))

Lib/test/test_float.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ def test_hash(self):
582582
self.assertEqual(hash(float('inf')), sys.hash_info.inf)
583583
self.assertEqual(hash(float('-inf')), -sys.hash_info.inf)
584584

585+
# TODO: RUSTPYTHON
586+
@unittest.expectedFailure
585587
def test_hash_nan(self):
586588
value = float('nan')
587589
self.assertEqual(hash(value), object.__hash__(value))

Lib/test/test_range.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def test_range(self):
9191
r = range(-sys.maxsize, sys.maxsize, 2)
9292
self.assertEqual(len(r), sys.maxsize)
9393

94+
# TODO: RUSTPYTHON
95+
@unittest.expectedFailure
9496
def test_range_constructor_error_messages(self):
9597
with self.assertRaisesRegex(
9698
TypeError,
@@ -373,6 +375,8 @@ def test_pickling(self):
373375
self.assertEqual(list(pickle.loads(pickle.dumps(r, proto))),
374376
list(r))
375377

378+
# TODO: RUSTPYTHON
379+
@unittest.expectedFailure
376380
def test_iterator_pickling(self):
377381
testcases = [(13,), (0, 11), (-22, 10), (20, 3, -1), (13, 21, 3),
378382
(-2, 2, 2)]
@@ -660,6 +664,8 @@ def test_comparison(self):
660664
range(0) >= range(0)
661665

662666

667+
# TODO: RUSTPYTHON
668+
@unittest.expectedFailure
663669
def test_attributes(self):
664670
# test the start, stop and step attributes of range objects
665671
self.assert_attrs(range(0), 0, 0, 1)

0 commit comments

Comments
 (0)