summaryrefslogtreecommitdiff
path: root/tests/test_concurrency.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:55:29 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:57:26 -0500
commit2af7e87b26754fea68adfd1b8aa51052d987e60c (patch)
tree3d81d1e79bebd529240629b9cd43c4f0e273046b /tests/test_concurrency.py
parente59da1bafafe4265188bb5c75c4e557dfbd47d90 (diff)
downloadpython-coveragepy-git-nedbat/better-combine-action.tar.gz
refactor: convert all skipping to pytest skipsnedbat/better-combine-action
Diffstat (limited to 'tests/test_concurrency.py')
-rw-r--r--tests/test_concurrency.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py
index fd7aa851..86c69cf5 100644
--- a/tests/test_concurrency.py
+++ b/tests/test_concurrency.py
@@ -12,6 +12,7 @@ import threading
import time
from flaky import flaky
+import pytest
import coverage
from coverage import env
@@ -363,15 +364,11 @@ MULTI_CODE = """
"""
+@pytest.mark.skipif(not multiprocessing, reason="No multiprocessing in this Python")
@flaky(max_runs=30) # Sometimes a test fails due to inherent randomness. Try more times.
class MultiprocessingTest(CoverageTest):
"""Test support of the multiprocessing module."""
- def setUp(self):
- if not multiprocessing:
- self.skipTest("No multiprocessing in this Python") # pragma: only jython
- super(MultiprocessingTest, self).setUp()
-
def try_multiprocessing_code(
self, code, expected_out, the_module, nprocs, concurrency="multiprocessing", args=""
):