diff --git a/tests/event/test_futures.py b/tests/event/test_futures.py index e120a2ab8e..adef5b33fc 100644 --- a/tests/event/test_futures.py +++ b/tests/event/test_futures.py @@ -1,6 +1,5 @@ from panda3d import core import pytest -import threading import time import sys @@ -39,7 +38,11 @@ def test_future_timeout(): fut.result(0.001) +@pytest.mark.skipif(not core.Thread.is_threading_supported(), + reason="Threading support disabled") def test_future_wait(): + threading = pytest.importorskip("direct.stdpy.threading") + fut = core.AsyncFuture() # Launch a thread to set the result value. @@ -59,7 +62,11 @@ def test_future_wait(): assert fut.result() is None +@pytest.mark.skipif(not core.Thread.is_threading_supported(), + reason="Threading support disabled") def test_future_wait_cancel(): + threading = pytest.importorskip("direct.stdpy.threading") + fut = core.AsyncFuture() # Launch a thread to cancel the future.