MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_warns_none_is_deprecated

Function test_warns_none_is_deprecated

testing/deprecated_test.py:193–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191
192
193def test_warns_none_is_deprecated():
194 with pytest.warns(
195 PytestDeprecationWarning,
196 match=re.escape(
197 "Passing None has been deprecated.\n"
198 "See https://docs.pytest.org/en/latest/how-to/capture-warnings.html"
199 "#additional-use-cases-of-warnings-in-tests"
200 " for alternatives in common use cases."
201 ),
202 ):
203 with pytest.warns(None): # type: ignore[call-overload]
204 pass
205
206
207class TestSkipMsgArgumentDeprecated:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected