File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ async def async_append(item):
88 return async_append
99
1010
11- async def test_resuls (async_sandbox : AsyncSandbox ):
11+ async def test_results (async_sandbox : AsyncSandbox ):
1212 results = []
1313
1414 execution = await async_sandbox .run_code (
@@ -18,6 +18,16 @@ async def test_resuls(async_sandbox: AsyncSandbox):
1818 assert execution .results [0 ].text == "1"
1919
2020
21+ async def test_results_sync_callback (async_sandbox : AsyncSandbox ):
22+ results = []
23+
24+ execution = await async_sandbox .run_code (
25+ "x = 1;x" , on_result = lambda result : results .append (result )
26+ )
27+ assert len (results ) == 1
28+ assert execution .results [0 ].text == "1"
29+
30+
2131async def test_error (async_sandbox : AsyncSandbox ):
2232 errors = []
2333 execution = await async_sandbox .run_code ("xyz" , on_error = async_append_fn (errors ))
You can’t perform that action at this time.
0 commit comments