aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-31 02:17:54 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commitfb7bc866464427f402d4855e200d84a32eba59e9 (patch)
tree196f037dc43cc52b301f8c6b9b6ecae7b1e2773d /tests
parent9a4daa3435254b38133fc9c6cb92c7fb181e7a0e (diff)
downloadwee-slack-fb7bc866464427f402d4855e200d84a32eba59e9.tar.gz
Make Future very similar to asyncio.Future
Diffstat (limited to 'tests')
-rw-r--r--tests/test_task_runner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_task_runner.py b/tests/test_task_runner.py
index 33b74a6..2aaa9f9 100644
--- a/tests/test_task_runner.py
+++ b/tests/test_task_runner.py
@@ -18,7 +18,7 @@ def test_run_single_task():
assert not shared.active_tasks
assert not shared.active_futures
- assert task.result == ("awaitable", ("data",))
+ assert task.result() == ("awaitable", ("data",))
def test_run_nested_task():
@@ -39,7 +39,7 @@ def test_run_nested_task():
assert not shared.active_tasks
assert not shared.active_futures
- assert task.result == ("awaitable2", ("awaitable1", ("data",)))
+ assert task.result() == ("awaitable2", ("awaitable1", ("data",)))
def test_run_two_tasks_concurrently():
@@ -59,8 +59,8 @@ def test_run_two_tasks_concurrently():
assert not shared.active_tasks
assert not shared.active_futures
- assert task1.result == ("awaitable", ("data1",))
- assert task2.result == ("awaitable", ("data2",))
+ assert task1.result() == ("awaitable", ("data1",))
+ assert task2.result() == ("awaitable", ("data2",))
def test_task_without_await():