tests: fix futures test when building without true threading
This commit is contained in:
parent
d6efceb1ed
commit
4bc0a1ef5e
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue