Skip to content

Commit 2cf3703

Browse files
committed
Unskip this test and remove the session scoping for a fixture because it would behave differently depending on the number of xdist nodes.
1 parent 863ca1a commit 2cf3703

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/contextful.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_06(some_data, more_data):
5858
assert len(some_data) == len(more_data) # r6
5959

6060

61-
@pytest.fixture(scope='session')
61+
@pytest.fixture
6262
def expensive_data():
6363
return list(range(10)) # s7
6464

tests/test_pytest_cov.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ def find_labels(text, pattern):
19441944
'test_contexts.py::test_07|setup': 's7',
19451945
'test_contexts.py::test_07|run': 'r7',
19461946
'test_contexts.py::test_08|run': 'r8',
1947-
'test_contexts.py::test_08|setup': 'r8',
1947+
'test_contexts.py::test_08|setup': 's7',
19481948
'test_contexts.py::test_09[1]|setup': 's9-1',
19491949
'test_contexts.py::test_09[1]|run': 'r9-1',
19501950
'test_contexts.py::test_09[2]|setup': 's9-2',
@@ -1963,8 +1963,6 @@ def find_labels(text, pattern):
19631963
}
19641964

19651965

1966-
@pytest.mark.skipif('coverage.version_info < (5, 0)')
1967-
@pytest.mark.skipif('coverage.version_info > (6, 4)')
19681966
@xdist_params
19691967
def test_contexts(pytester, testdir, opts):
19701968
with open(os.path.join(os.path.dirname(__file__), 'contextful.py')) as f:

0 commit comments

Comments
 (0)