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 bca3fa9 commit 917d541Copy full SHA for 917d541
tests/cadence/_internal/workflow/test_deterministic_event_loop.py
@@ -76,3 +76,17 @@ def test_create_task(self):
76
size = 10000
77
results = self.loop.run_until_complete(coro_await_task(size))
78
assert results == list(range(size))
79
+
80
+ def test_run_once(self):
81
+ # run once won't clear the read queue
82
+ self.loop.create_task(coro_await_task(10))
83
+ self.loop.stop()
84
+ self.loop.run_forever()
85
+ assert len(self.loop._ready) == 10
86
87
+ def test_run_until_yield(self):
88
+ # run until yield will clear the read queue
89
+ task = self.loop.create_task(coro_await_task(3))
90
+ self.loop.run_until_yield()
91
+ assert len(self.loop._ready) == 0
92
+ assert task.done() is True
0 commit comments