Skip to content

Commit 817cdf1

Browse files
committed
Skip time-sensitive subshell tests if measuring coverage
1 parent c5ebadb commit 817cdf1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/test_subshells.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ def test_thread_ids():
130130
)
131131
@pytest.mark.parametrize("are_subshells", [(False, True), (True, False), (True, True)])
132132
@pytest.mark.parametrize("overlap", [True, False])
133-
def test_run_concurrently_sequence(are_subshells, overlap):
133+
def test_run_concurrently_sequence(are_subshells, overlap, request):
134+
if request.config.getvalue("--cov"):
135+
pytest.skip("Skip time-sensitive subshell tests if measuring coverage")
136+
134137
with new_kernel() as kc:
135138
subshell_ids = [
136139
create_subshell_helper(kc)["subshell_id"] if is_subshell else None
@@ -173,7 +176,10 @@ def test_run_concurrently_sequence(are_subshells, overlap):
173176

174177

175178
@pytest.mark.parametrize("include_main_shell", [True, False])
176-
def test_run_concurrently_timing(include_main_shell):
179+
def test_run_concurrently_timing(include_main_shell, request):
180+
if request.config.getvalue("--cov"):
181+
pytest.skip("Skip time-sensitive subshell tests if measuring coverage")
182+
177183
with new_kernel() as kc:
178184
subshell_ids = [
179185
None if include_main_shell else create_subshell_helper(kc)["subshell_id"],

0 commit comments

Comments
 (0)