We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b695cdf commit 3d3922cCopy full SHA for 3d3922c
1 file changed
src/galaxy/unittest/mock.py
@@ -21,11 +21,19 @@ def coroutine_mock():
21
corofunc.coro = coro
22
return corofunc
23
24
+
25
async def skip_loop(iterations=1):
26
for _ in range(iterations):
27
await asyncio.sleep(0)
28
29
30
async def async_return_value(return_value, loop_iterations_delay=0):
- await skip_loop(loop_iterations_delay)
31
+ if loop_iterations_delay > 0:
32
+ await skip_loop(loop_iterations_delay)
33
return return_value
34
35
36
+async def async_raise(error, loop_iterations_delay=0):
37
38
39
+ raise error
0 commit comments