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-07 17:24:44 -0500
commitc0921466d3d235f10be333da1f9cf523f4e2e24c (patch)
tree5e67f7e62db1048229a54e308885b935616b6e5a /tests/test_concurrency.py
parent465dace54a3f3300c0a86b527a8f77d0475fc895 (diff)
downloadpython-coveragepy-git-c0921466d3d235f10be333da1f9cf523f4e2e24c.tar.gz
refactor: convert all skipping to pytest skips
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=""
):