Skip to content

Commit 4d6dbf7

Browse files
committed
mark failures
1 parent 5c65733 commit 4d6dbf7

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed

Lib/test/test_asyncio/test_free_threading.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ 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
193+
def test_task_different_thread_finalized(self):
194+
return super().test_task_different_thread_finalized()
195+
196+
@unittest.skip("TODO: RUSTPYTHON; hangs - Python _current_tasks dict not thread-safe")
197+
def test_all_tasks_race(self):
198+
return super().test_all_tasks_race()
199+
192200

193201
@unittest.skipUnless(hasattr(asyncio.tasks, "_c_all_tasks"), "requires _asyncio")
194202
class TestCFreeThreading(TestFreeThreading, TestCase):
@@ -220,6 +228,14 @@ class TestEagerPyFreeThreading(TestPyFreeThreading):
220228
def factory(self, loop, coro, eager_start=True, **kwargs):
221229
return asyncio.tasks._PyTask(coro, loop=loop, **kwargs, eager_start=eager_start)
222230

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
232+
def test_task_different_thread_finalized(self):
233+
return super().test_task_different_thread_finalized()
234+
235+
@unittest.skip("TODO: RUSTPYTHON; hangs - Python _current_tasks dict not thread-safe")
236+
def test_all_tasks_race(self):
237+
return super().test_all_tasks_race()
238+
223239

224240
@unittest.skipUnless(hasattr(asyncio.tasks, "_c_all_tasks"), "requires _asyncio")
225241
class TestEagerCFreeThreading(TestCFreeThreading, TestCase):

Lib/test/test_asyncio/test_streams.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ def test_eof_feed_when_closing_writer(self):
10781078

10791079
self.assertEqual(messages, [])
10801080

1081+
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: 0 != 1
10811082
def test_unclosed_resource_warnings(self):
10821083
async def inner(httpd):
10831084
rd, wr = await asyncio.open_connection(*httpd.address)
@@ -1197,6 +1198,7 @@ async def handle_echo(reader, writer):
11971198
messages = self._basetest_unhandled_exceptions(handle_echo)
11981199
self.assertEqual(messages, [])
11991200

1201+
@unittest.expectedFailure # TODO: RUSTPYTHON; NotImplementedError
12001202
def test_open_connection_happy_eyeball_refcycles(self):
12011203
port = socket_helper.find_unused_port()
12021204
async def main():

Lib/test/test_asyncio/test_taskgroups.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,13 +1106,61 @@ async def throw_error():
11061106
class TestTaskGroup(BaseTestTaskGroup, unittest.IsolatedAsyncioTestCase):
11071107
loop_factory = asyncio.EventLoop
11081108

1109+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes propagate_cancellation_error
1110+
async def test_exception_refcycles_propagate_cancellation_error(self):
1111+
return await super().test_exception_refcycles_propagate_cancellation_error()
1112+
1113+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._base_error
1114+
async def test_exception_refcycles_base_error(self):
1115+
return await super().test_exception_refcycles_base_error()
1116+
1117+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._errors, and __aexit__ args
1118+
async def test_exception_refcycles_errors(self):
1119+
return await super().test_exception_refcycles_errors()
1120+
1121+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._parent_task
1122+
async def test_exception_refcycles_parent_task(self):
1123+
return await super().test_exception_refcycles_parent_task()
1124+
1125+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._parent_task and create_task() deletes task
1126+
async def test_exception_refcycles_parent_task_wr(self):
1127+
return await super().test_exception_refcycles_parent_task_wr()
1128+
1129+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup doesn't keep a reference to the raised ExceptionGroup
1130+
async def test_exception_refcycles_direct(self):
1131+
return await super().test_exception_refcycles_direct()
1132+
11091133
class TestEagerTaskTaskGroup(BaseTestTaskGroup, unittest.IsolatedAsyncioTestCase):
11101134
@staticmethod
11111135
def loop_factory():
11121136
loop = asyncio.EventLoop()
11131137
loop.set_task_factory(asyncio.eager_task_factory)
11141138
return loop
11151139

1140+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes propagate_cancellation_error
1141+
async def test_exception_refcycles_propagate_cancellation_error(self):
1142+
return await super().test_exception_refcycles_propagate_cancellation_error()
1143+
1144+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._base_error
1145+
async def test_exception_refcycles_base_error(self):
1146+
return await super().test_exception_refcycles_base_error()
1147+
1148+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._errors, and __aexit__ args
1149+
async def test_exception_refcycles_errors(self):
1150+
return await super().test_exception_refcycles_errors()
1151+
1152+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._parent_task
1153+
async def test_exception_refcycles_parent_task(self):
1154+
return await super().test_exception_refcycles_parent_task()
1155+
1156+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup deletes self._parent_task and create_task() deletes task
1157+
async def test_exception_refcycles_parent_task_wr(self):
1158+
return await super().test_exception_refcycles_parent_task_wr()
1159+
1160+
@unittest.expectedFailure # TODO: RUSTPYTHON; Test that TaskGroup doesn't keep a reference to the raised ExceptionGroup
1161+
async def test_exception_refcycles_direct(self):
1162+
return await super().test_exception_refcycles_direct()
1163+
11161164

11171165
if __name__ == "__main__":
11181166
unittest.main()

Lib/test/test_asyncio/test_tasks.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,6 +2942,10 @@ async def coro():
29422942
with self.assertRaises(AttributeError):
29432943
del task._log_destroy_pending
29442944

2945+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
2946+
def test_log_destroyed_pending_task(self):
2947+
return super().test_log_destroyed_pending_task()
2948+
29452949

29462950
@unittest.skipUnless(hasattr(futures, '_CFuture') and
29472951
hasattr(tasks, '_CTask'),
@@ -2954,6 +2958,10 @@ class CTask_CFuture_SubclassTests(BaseTaskTests, test_utils.TestCase):
29542958
all_tasks = getattr(tasks, '_c_all_tasks', None)
29552959
current_task = staticmethod(getattr(tasks, '_c_current_task', None))
29562960

2961+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
2962+
def test_log_destroyed_pending_task(self):
2963+
return super().test_log_destroyed_pending_task()
2964+
29572965

29582966
@unittest.skipUnless(hasattr(tasks, '_CTask'),
29592967
'requires the C _asyncio module')
@@ -2965,6 +2973,10 @@ class CTaskSubclass_PyFuture_Tests(BaseTaskTests, test_utils.TestCase):
29652973
all_tasks = getattr(tasks, '_c_all_tasks', None)
29662974
current_task = staticmethod(getattr(tasks, '_c_current_task', None))
29672975

2976+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
2977+
def test_log_destroyed_pending_task(self):
2978+
return super().test_log_destroyed_pending_task()
2979+
29682980

29692981
@unittest.skipUnless(hasattr(futures, '_CFuture'),
29702982
'requires the C _asyncio module')
@@ -2976,6 +2988,10 @@ class PyTask_CFutureSubclass_Tests(BaseTaskTests, test_utils.TestCase):
29762988
all_tasks = staticmethod(tasks._py_all_tasks)
29772989
current_task = staticmethod(tasks._py_current_task)
29782990

2991+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
2992+
def test_log_destroyed_pending_task(self):
2993+
return super().test_log_destroyed_pending_task()
2994+
29792995

29802996
@unittest.skipUnless(hasattr(tasks, '_CTask'),
29812997
'requires the C _asyncio module')
@@ -2986,6 +3002,10 @@ class CTask_PyFuture_Tests(BaseTaskTests, test_utils.TestCase):
29863002
all_tasks = getattr(tasks, '_c_all_tasks', None)
29873003
current_task = staticmethod(getattr(tasks, '_c_current_task', None))
29883004

3005+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
3006+
def test_log_destroyed_pending_task(self):
3007+
return super().test_log_destroyed_pending_task()
3008+
29893009

29903010
@unittest.skipUnless(hasattr(futures, '_CFuture'),
29913011
'requires the C _asyncio module')
@@ -2996,6 +3016,10 @@ class PyTask_CFuture_Tests(BaseTaskTests, test_utils.TestCase):
29963016
all_tasks = staticmethod(tasks._py_all_tasks)
29973017
current_task = staticmethod(tasks._py_current_task)
29983018

3019+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
3020+
def test_log_destroyed_pending_task(self):
3021+
return super().test_log_destroyed_pending_task()
3022+
29993023

30003024
class PyTask_PyFuture_Tests(BaseTaskTests, SetMethodsTest,
30013025
test_utils.TestCase):
@@ -3005,6 +3029,10 @@ class PyTask_PyFuture_Tests(BaseTaskTests, SetMethodsTest,
30053029
all_tasks = staticmethod(tasks._py_all_tasks)
30063030
current_task = staticmethod(tasks._py_current_task)
30073031

3032+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
3033+
def test_log_destroyed_pending_task(self):
3034+
return super().test_log_destroyed_pending_task()
3035+
30083036

30093037
@add_subclass_tests
30103038
class PyTask_PyFuture_SubclassTests(BaseTaskTests, test_utils.TestCase):
@@ -3013,6 +3041,10 @@ class PyTask_PyFuture_SubclassTests(BaseTaskTests, test_utils.TestCase):
30133041
all_tasks = staticmethod(tasks._py_all_tasks)
30143042
current_task = staticmethod(tasks._py_current_task)
30153043

3044+
@unittest.expectedFailure # TODO: RUSTPYTHON; Actual: not called.
3045+
def test_log_destroyed_pending_task(self):
3046+
return super().test_log_destroyed_pending_task()
3047+
30163048
@unittest.skipUnless(hasattr(tasks, '_CTask'),
30173049
'requires the C _asyncio module')
30183050
class CTask_Future_Tests(test_utils.TestCase):

0 commit comments

Comments
 (0)