Skip to content

Commit 0fd7fea

Browse files
authored
Update link to notes about usage as context manager (#313)
Fix #312
1 parent 903b972 commit 0fd7fea

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
@@ -213,7 +213,7 @@ def _start_patch(
213213
"Mocks returned by pytest-mock do not need to be used as context managers. "
214214
"The mocker fixture automatically undoes mocking at the end of a test. "
215215
"This warning can be ignored if it was triggered by mocking a context manager. "
216-
"https://github.com/pytest-dev/pytest-mock#note-about-usage-as-context-manager",
216+
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager",
217217
PytestMockWarning,
218218
stacklevel=depth,
219219
)

tests/test_pytest_mock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ def doIt(self):
884884
"Mocks returned by pytest-mock do not need to be used as context managers. "
885885
"The mocker fixture automatically undoes mocking at the end of a test. "
886886
"This warning can be ignored if it was triggered by mocking a context manager. "
887-
"https://github.com/pytest-dev/pytest-mock#note-about-usage-as-context-manager"
887+
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager"
888888
)
889889

890890
with pytest.warns(
@@ -901,7 +901,7 @@ def test_warn_patch_context_manager(mocker: MockerFixture) -> None:
901901
"Mocks returned by pytest-mock do not need to be used as context managers. "
902902
"The mocker fixture automatically undoes mocking at the end of a test. "
903903
"This warning can be ignored if it was triggered by mocking a context manager. "
904-
"https://github.com/pytest-dev/pytest-mock#note-about-usage-as-context-manager"
904+
"https://pytest-mock.readthedocs.io/en/latest/remarks.html#usage-as-context-manager"
905905
)
906906

907907
with pytest.warns(

0 commit comments

Comments
 (0)