Skip to content

Commit a76eb4d

Browse files
Update url in warning (#490)
This was missed in #383
1 parent 9c18793 commit a76eb4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/pytest_mock/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def _start_patch(
264264
"Mocks returned by pytest-mock do not need to be used as context managers. "
265265
"The mocker fixture automatically undoes mocking at the end of a test. "
266266
"This warning can be ignored if it was triggered by mocking a context manager. "
267-
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager",
267+
"https://pytest-mock.readthedocs.io/en/latest/usage.html#usage-as-context-manager",
268268
PytestMockWarning,
269269
stacklevel=5,
270270
)

tests/test_pytest_mock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ def doIt(self):
997997
"Mocks returned by pytest-mock do not need to be used as context managers. "
998998
"The mocker fixture automatically undoes mocking at the end of a test. "
999999
"This warning can be ignored if it was triggered by mocking a context manager. "
1000-
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager"
1000+
"https://pytest-mock.readthedocs.io/en/latest/usage.html#usage-as-context-manager"
10011001
)
10021002

10031003
with pytest.warns(
@@ -1014,7 +1014,7 @@ def test_warn_patch_context_manager(mocker: MockerFixture) -> None:
10141014
"Mocks returned by pytest-mock do not need to be used as context managers. "
10151015
"The mocker fixture automatically undoes mocking at the end of a test. "
10161016
"This warning can be ignored if it was triggered by mocking a context manager. "
1017-
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager"
1017+
"https://pytest-mock.readthedocs.io/en/latest/usage.html#usage-as-context-manager"
10181018
)
10191019

10201020
with pytest.warns(

0 commit comments

Comments
 (0)