Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test
  • Loading branch information
kumaraditya303 committed Jan 13, 2025
commit 025fd626a12501548e3f8494fa36f372a8afcbac
7 changes: 3 additions & 4 deletions Lib/test/test_asyncio/test_free_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ async def main():
r.run(main())

def test_run_coroutine_threadsafe_exception(self) -> None:
exc = MyException("test")

async def coro():
await asyncio.sleep(0)
raise exc
raise MyException("test")

def in_thread(loop: asyncio.AbstractEventLoop):
fut = asyncio.run_coroutine_threadsafe(coro(), loop)
Expand All @@ -101,7 +99,8 @@ async def main():

self.assertEqual(len(results), 10)
for result in results:
self.assertIs(result, exc)
self.assertIsInstance(result, MyException)
self.assertEqual(str(result), "test")

with asyncio.Runner() as r:
loop = r.get_loop()
Expand Down