diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-30 18:07:36 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-30 18:35:09 -0500 |
commit | 45787e29dea3a41f2e9570b66a571a7ebcda4592 (patch) | |
tree | 7eeadde7d7a033e27abd1df7411bb525bd711148 /tests/test_concurrency.py | |
parent | 85c7a4ac4161c4eb2efeaf07e6f833d3a073b018 (diff) | |
download | python-coveragepy-git-45787e29dea3a41f2e9570b66a571a7ebcda4592.tar.gz |
refactor: removed mentions of Jython and IronPython
Diffstat (limited to 'tests/test_concurrency.py')
-rw-r--r-- | tests/test_concurrency.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 2c827760..8dea0a44 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -4,6 +4,7 @@ """Tests for concurrency libraries.""" import glob +import multiprocessing import os import random import re @@ -12,6 +13,7 @@ import threading import time from flaky import flaky +import greenlet import pytest import coverage @@ -27,11 +29,6 @@ from tests.coveragetest import CoverageTest # These libraries aren't always available, we'll skip tests if they aren't. try: - import multiprocessing -except ImportError: # pragma: only jython - multiprocessing = None - -try: import eventlet except ImportError: eventlet = None @@ -41,11 +38,6 @@ try: except ImportError: gevent = None -try: - import greenlet -except ImportError: # pragma: only jython - greenlet = None - def measurable_line(l): """Is this a line of code coverage will measure? @@ -59,9 +51,6 @@ def measurable_line(l): return False if l.startswith('else:'): return False - if env.JYTHON and l.startswith(('try:', 'except:', 'except ', 'break', 'with ')): - # Jython doesn't measure these statements. - return False # pragma: only jython return True @@ -443,7 +432,6 @@ def start_method_fixture(request): return start_method -@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.""" |