Skip to content

Commit ad95d59

Browse files
authored
Use monkeypatch in test_pytest_version_env_var
Follow up to #12190
1 parent 48b6d18 commit ad95d59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/test_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ def func() -> None:
10971097

10981098

10991099
def test_pytest_version_env_var(pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
1100-
os.environ["PYTEST_VERSION"] = "old version"
1100+
monkeypatch.setenv("PYTEST_VERSION", "old version")
11011101
pytester.makepyfile(
11021102
"""
11031103
import pytest

0 commit comments

Comments
 (0)