diff --git a/tests/markers.py b/tests/markers.py deleted file mode 100644 index 66291fca..00000000 --- a/tests/markers.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import annotations - -from platform import python_implementation - -import pytest - -cpython_only = pytest.mark.skipif(python_implementation() != "CPython", reason="CPython only.") diff --git a/tests/test_isolated.py b/tests/test_isolated.py index de740f31..2d3ff972 100644 --- a/tests/test_isolated.py +++ b/tests/test_isolated.py @@ -1,11 +1,14 @@ import pytest import importlib -from .markers import cpython_only +from watchdog.utils import platform + from .utils import run_isolated_test -@cpython_only +# Kqueue isn't supported by Eventlet, so BSD is out +# Current usage ReadDirectoryChangesW on Windows is blocking, though async may be possible +@pytest.mark.skipif(not platform.is_linux(), reason="Eventlet only supported in Linux") def test_observer_stops_in_eventlet(): if not importlib.util.find_spec('eventlet'): pytest.skip("eventlet not installed") @@ -13,7 +16,7 @@ def test_observer_stops_in_eventlet(): run_isolated_test('eventlet_observer_stops.py') -@cpython_only +@pytest.mark.skipif(not platform.is_linux(), reason="Eventlet only supported in Linux") def test_eventlet_skip_repeat_queue(): if not importlib.util.find_spec('eventlet'): pytest.skip("eventlet not installed")