Skip to content

Commit 7ab8d00

Browse files
committed
mark test failures
1 parent d9118ab commit 7ab8d00

File tree

13 files changed

+25
-6
lines changed

13 files changed

+25
-6
lines changed

Lib/test/test_asyncgen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,7 @@ async def run():
10261026
fut.cancel()
10271027
self.loop.run_until_complete(asyncio.sleep(0.01))
10281028

1029+
@unittest.expectedFailure # TODO: RUSTPYTHON; gc_collect doesn't finalize async generators
10291030
def test_async_gen_asyncio_gc_aclose_09(self):
10301031
DONE = 0
10311032

@@ -1512,6 +1513,7 @@ async def main():
15121513
self.assertIn('an error occurred during closing of asynchronous generator',
15131514
message['message'])
15141515

1516+
@unittest.expectedFailure # TODO: RUSTPYTHON; gc_collect doesn't finalize async generators, different cleanup path
15151517
def test_async_gen_asyncio_shutdown_exception_02(self):
15161518
messages = []
15171519

Lib/test/test_asyncio/test_free_threading.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def tearDown(self):
189189
def factory(self, loop, coro, **kwargs):
190190
return asyncio.tasks._PyTask(coro, loop=loop, **kwargs)
191191

192-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <Task finished name='Task-7322' coro=<TestFreeThreading.test_task_different_thread_finalized.<locals>.func() done, defined at /Users/al03219714/Projects/RustPython2/crates/pylib/Lib/test/test_asyncio/test_free_threading.py:101> result=None> is not None
192+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC weak reference timing issue
193193
def test_task_different_thread_finalized(self):
194194
return super().test_task_different_thread_finalized()
195195

@@ -228,7 +228,7 @@ class TestEagerPyFreeThreading(TestPyFreeThreading):
228228
def factory(self, loop, coro, eager_start=True, **kwargs):
229229
return asyncio.tasks._PyTask(coro, loop=loop, **kwargs, eager_start=eager_start)
230230

231-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <Task finished name='Task-5240' coro=<TestFreeThreading.test_task_different_thread_finalized.<locals>.func() done, defined at /Users/al03219714/Projects/RustPython2/crates/pylib/Lib/test/test_asyncio/test_free_threading.py:101> result=None> is not None
231+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC weak reference timing issue
232232
def test_task_different_thread_finalized(self):
233233
return super().test_task_different_thread_finalized()
234234

Lib/test/test_asyncio/test_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ def test_eof_feed_when_closing_writer(self):
10781078

10791079
self.assertEqual(messages, [])
10801080

1081-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 0 != 1
1081+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC finalization timing issue
10821082
def test_unclosed_resource_warnings(self):
10831083
async def inner(httpd):
10841084
rd, wr = await asyncio.open_connection(*httpd.address)

Lib/test/test_concurrent_futures/test_as_completed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def test_duplicate_futures(self):
7272
]
7373
self.assertEqual(len(completed), 1)
7474

75+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC weak reference not collected
7576
def test_free_reference_yielded_future(self):
7677
# Issue #14406: Generator should not keep references
7778
# to finished futures.

Lib/test/test_concurrent_futures/test_init.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,11 @@ def _test(self, test_class):
136136

137137
self.assertEqual(_resource_tracker._exitcode, 0)
138138

139+
@unittest.expectedFailure # TODO: RUSTPYTHON; resource tracker exit code mismatch
139140
def test_spawn(self):
140141
self._test(ProcessPoolSpawnFailingInitializerTest)
141142

143+
@unittest.expectedFailure # TODO: RUSTPYTHON; resource tracker exit code mismatch
142144
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
143145
def test_forkserver(self):
144146
self._test(ProcessPoolForkserverFailingInitializerTest)

Lib/test/test_copy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,12 +837,15 @@ class C(object):
837837
v[x] = y
838838
self.assertNotIn(x, u)
839839

840+
@unittest.expectedFailure # TODO: RUSTPYTHON; weakref callback not fired immediately by gc_collect
840841
def test_copy_weakkeydict(self):
841842
self._check_copy_weakdict(weakref.WeakKeyDictionary)
842843

844+
@unittest.expectedFailure # TODO: RUSTPYTHON; weakref callback not fired immediately by gc_collect
843845
def test_copy_weakvaluedict(self):
844846
self._check_copy_weakdict(weakref.WeakValueDictionary)
845847

848+
@unittest.expectedFailure # TODO: RUSTPYTHON; weakref callback not fired immediately by gc_collect
846849
def test_deepcopy_weakkeydict(self):
847850
class C(object):
848851
def __init__(self, i):
@@ -863,6 +866,7 @@ def __init__(self, i):
863866
support.gc_collect() # For PyPy or other GCs.
864867
self.assertEqual(len(v), 1)
865868

869+
@unittest.expectedFailure # TODO: RUSTPYTHON; weakref callback not fired immediately by gc_collect
866870
def test_deepcopy_weakvaluedict(self):
867871
class C(object):
868872
def __init__(self, i):

Lib/test/test_coroutines.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,7 @@ async def foo():
16681668

16691669
self.assertEqual(sys.getrefcount(aiter), refs_before)
16701670

1671+
@unittest.expectedFailure # TODO: RUSTPYTHON; refcount leak in async for/with
16711672
def test_for_6(self):
16721673
I = 0
16731674

Lib/test/test_exceptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,7 @@ def do_close(g):
10761076
g.close()
10771077
self._check_generator_cleanup_exc_state(do_close)
10781078

1079+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC generator cleanup timing
10791080
def test_generator_del_cleanup_exc_state(self):
10801081
def do_del(g):
10811082
g = None

Lib/test/test_subprocess.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,14 +2274,12 @@ def test_group_error(self):
22742274
with self.assertRaises(ValueError):
22752275
subprocess.check_call(ZERO_RETURN_CMD, group=65535)
22762276

2277-
@unittest.expectedFailure # TODO: RUSTPYTHON; observed gids do not match expected gids
22782277
@unittest.skipUnless(hasattr(os, 'setgroups'), 'no setgroups() on platform')
22792278
def test_extra_groups(self):
22802279
gid = os.getegid()
22812280
group_list = [65534 if gid != 65534 else 65533]
22822281
self._test_extra_groups_impl(gid=gid, group_list=group_list)
22832282

2284-
@unittest.expectedFailure # TODO: RUSTPYTHON
22852283
@unittest.skipUnless(hasattr(os, 'setgroups'), 'no setgroups() on platform')
22862284
def test_extra_groups_empty_list(self):
22872285
self._test_extra_groups_impl(gid=os.getegid(), group_list=[])
@@ -3284,6 +3282,7 @@ def test_select_unbuffered(self):
32843282
finally:
32853283
p.wait()
32863284

3285+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC Popen.__del__ timing
32873286
def test_zombie_fast_process_del(self):
32883287
# Issue #12650: on Unix, if Popen.__del__() was called before the
32893288
# process exited, it wouldn't be added to subprocess._active, and would
@@ -3308,6 +3307,7 @@ def test_zombie_fast_process_del(self):
33083307
# check that p is in the active processes list
33093308
self.assertIn(ident, [id(o) for o in subprocess._active])
33103309

3310+
@unittest.expectedFailure # TODO: RUSTPYTHON; GC Popen.__del__ timing
33113311
def test_leak_fast_process_del_killed(self):
33123312
# Issue #12650: on Unix, if Popen.__del__() was called before the
33133313
# process exited, and the process got killed by a signal, it would never

Lib/test/test_unittest/test_async_case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ async def cleanup(self, fut):
475475
test.doCleanups()
476476
self.assertEqual(events, ['asyncSetUp', 'test', 'cleanup'])
477477

478-
@unittest.expectedFailure
479478
def test_setup_get_event_loop(self):
480479
# See https://github.com/python/cpython/issues/95736
481480
# Make sure the default event loop is not used

0 commit comments

Comments
 (0)