diff options
-rw-r--r-- | extra_tests/test_posix_extra.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extra_tests/test_posix_extra.py b/extra_tests/test_posix_extra.py index fe58ec0a7e..8864f6a13f 100644 --- a/extra_tests/test_posix_extra.py +++ b/extra_tests/test_posix_extra.py @@ -1,4 +1,4 @@ -import py +import pytest import sys, os, subprocess @@ -30,9 +30,8 @@ time.sleep(1.0) """ +@pytest.mark.skipif("not getattr(os, 'fork', None)") def test_thread_fork_file_lock(): - if not hasattr(os, 'fork'): - py.test.skip("requires 'fork'") output = subprocess.check_output([sys.executable, '-u', '-c', CODE]) assert output.splitlines() == [ 'thread started', |