mirror of
https://github.com/panda3d/panda3d.git
synced 2026-05-12 17:48:49 -05:00
tests: fix futures test when building without true threading
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user