We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ed7c50 commit 216dc96Copy full SHA for 216dc96
Lib/test/test_unittest/test_async_case.py
@@ -484,5 +484,19 @@ async def test_demo1(self):
484
result = test.run()
485
self.assertTrue(result.wasSuccessful())
486
487
+ def test_loop_factory(self):
488
+ asyncio.set_event_loop_policy(None)
489
+
490
+ class TestCase1(unittest.IsolatedAsyncioTestCase):
491
+ loop_factory = asyncio.EventLoop
492
493
+ async def test_demo1(self):
494
+ pass
495
496
+ test = TestCase1('test_demo1')
497
+ result = test.run()
498
+ self.assertTrue(result.wasSuccessful())
499
+ self.assertIsNone(support.maybe_get_event_loop_policy())
500
501
if __name__ == "__main__":
502
unittest.main()
0 commit comments