Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pytest_mock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def _start_patch(
"Mocks returned by pytest-mock do not need to be used as context managers. "
"The mocker fixture automatically undoes mocking at the end of a test. "
"This warning can be ignored if it was triggered by mocking a context manager. "
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager",
"https://pytest-mock.readthedocs.io/en/latest/usage.html#usage-as-context-manager",
PytestMockWarning,
stacklevel=5,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pytest_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def doIt(self):
"Mocks returned by pytest-mock do not need to be used as context managers. "
"The mocker fixture automatically undoes mocking at the end of a test. "
"This warning can be ignored if it was triggered by mocking a context manager. "
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager"
"https://pytest-mock.readthedocs.io/en/latest/usage.html#usage-as-context-manager"
)

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

with pytest.warns(
Expand Down