From 2e21cf87e4490eb775263b836ed7f59a18cf9fe4 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 22 Feb 2023 23:18:23 +0100 Subject: [PATCH] tests: Skip test_task_cancel_waiting() test if no threads enabled --- tests/event/test_futures.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/event/test_futures.py b/tests/event/test_futures.py index 13531db55b..3bc1ede617 100644 --- a/tests/event/test_futures.py +++ b/tests/event/test_futures.py @@ -174,6 +174,8 @@ def test_task_cancel_during_run(): task.result() +@pytest.mark.skipif(not core.Thread.is_threading_supported(), + reason="Threading support disabled") def test_task_cancel_waiting(): # Calling result() in a threaded task chain should cancel the future being # waited on if the surrounding task is cancelled.