Skip to content

Commit d53c129

Browse files
committed
fix compatibility with pytest ^8
1 parent e92efad commit d53c129

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed

dependencies/default/constraints.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ hypothesis==6.96.2
55
iniconfig==2.0.0
66
packaging==23.2
77
pluggy==1.3.0
8-
pytest==7.4.4
8+
pytest==8.0.0
99
sortedcontainers==2.4.0
1010
tomli==2.0.1
1111
typing_extensions==4.9.0

dependencies/default/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Always adjust install_requires in setup.cfg and pytest-min-requirements.txt
22
# when changing runtime dependencies
3-
pytest >= 7.0.0,<8
3+
pytest >= 7.0.0, !=8.0.0rc1, !=8.0.0rc2

dependencies/pytest-min/constraints.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ packaging==23.2
1414
pluggy==1.3.0
1515
py==1.11.0
1616
Pygments==2.16.1
17-
pytest==7.0.0
17+
pytest==8.0.0
1818
requests==2.31.0
1919
sortedcontainers==2.4.0
2020
tomli==2.0.1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Always adjust install_requires in setup.cfg and requirements.txt
22
# when changing minimum version dependencies
3-
pytest[testing] == 7.0.0
3+
pytest[testing] == 8.0.0

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ include_package_data = True
4040

4141
# Always adjust requirements.txt and pytest-min-requirements.txt when changing runtime dependencies
4242
install_requires =
43-
pytest >= 7.0.0,<8
43+
pytest >= 7.0.0, !=8.0.0rc1, !=8.0.0rc2
4444

4545
[options.extras_require]
4646
testing =

tests/markers/test_session_scope.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ async def test_this_runs_in_same_loop(self):
4444
"""
4545
),
4646
)
47-
subpackage_name = "subpkg"
47+
48+
# subpackage_name must alphabetically come after test_module_one.py
49+
subpackage_name = "z_subpkg"
4850
subpkg = pytester.mkpydir(subpackage_name)
4951
subpkg.joinpath("test_subpkg.py").write_text(
5052
dedent(

tests/test_is_async_test.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ def pytest_collection_modifyitems(items):
7777
if pytest.version_tuple < (7, 2):
7878
# Probably related to https://github.com/pytest-dev/pytest/pull/10012
7979
result.assert_outcomes(failed=1)
80-
else:
80+
elif pytest.version_tuple < (8,):
8181
result.assert_outcomes(skipped=1)
82+
else:
83+
result.assert_outcomes(failed=1)
8284

8385

8486
def test_returns_true_for_unmarked_coroutine_item_in_auto_mode(pytester: Pytester):

0 commit comments

Comments
 (0)