diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-31 20:04:20 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78 (patch) | |
tree | eb4edb64a0180d34afd48afb4f51b4c3ed3e3fd2 /tests/test_sleep.py | |
parent | fb7bc866464427f402d4855e200d84a32eba59e9 (diff) | |
download | wee-slack-bfa38ba5ee0a7a4387eddc30feb1e3ad2e1aab78.tar.gz |
Don't set future result in __await__
Diffstat (limited to 'tests/test_sleep.py')
-rw-r--r-- | tests/test_sleep.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_sleep.py b/tests/test_sleep.py index 893c108..35a162c 100644 --- a/tests/test_sleep.py +++ b/tests/test_sleep.py @@ -13,11 +13,12 @@ def test_sleep(mock_method: MagicMock): coroutine = sleep(milliseconds) future = coroutine.send(None) assert isinstance(future, FutureTimer) + future.set_result((0,)) mock_method.assert_called_once_with( milliseconds, 0, 1, get_callback_name(weechat_task_cb), future.id ) with pytest.raises(StopIteration) as excinfo: - coroutine.send((0,)) + coroutine.send(None) assert excinfo.value.value == (0,) # TODO: Will probably change to None |