Skip to content

Commit 30a2223

Browse files
committed
Fix tests
1 parent fe2946b commit 30a2223

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/snippets/async_stuff.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ async def a(s, m):
3030

3131
loop = asyncio.get_event_loop()
3232
loop.run_until_complete(
33-
asyncio.wait([a(0, "hello1"), a(0.5, "hello2"), a(1, "hello3"), a(1.5, "hello4")])
33+
asyncio.wait(
34+
[a(0, "hello1"), a(0.75, "hello2"), a(1.5, "hello3"), a(2.25, "hello4")]
35+
)
3436
)
3537

38+
3639
assert ls == [
3740
1,
3841
3,
@@ -46,8 +49,8 @@ async def a(s, m):
4649
"hello2",
4750
"hello1",
4851
"hello3",
49-
"hello4",
5052
"hello2",
53+
"hello4",
5154
"hello3",
5255
"hello4",
5356
]

vm/src/frame.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ impl Frame {
239239
self.lasti.set(self.lasti.get() + 1);
240240
let val = objiter::stop_iter_value(vm, &err)?;
241241
self._send(coro, val, vm)
242-
})?;
243-
Ok(ExecutionResult::Return(vm.get_none()))
242+
})
243+
.map(ExecutionResult::Yield)
244244
} else {
245245
let exception = vm.new_exception_obj(exc_type, vec![exc_val])?;
246246
match self.unwind_blocks(vm, UnwindReason::Raising { exception }) {

0 commit comments

Comments
 (0)