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

Function test_importing_instance_is_deprecated

testing/deprecated_test.py:299–310  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

297 reason="This deprecation can only be emitted on python>=3.7",
298)
299def test_importing_instance_is_deprecated(pytester: Pytester) -> None:
300 with pytest.warns(
301 pytest.PytestDeprecationWarning,
302 match=re.escape("The pytest.Instance collector type is deprecated"),
303 ):
304 pytest.Instance
305
306 with pytest.warns(
307 pytest.PytestDeprecationWarning,
308 match=re.escape("The pytest.Instance collector type is deprecated"),
309 ):
310 from _pytest.python import Instance # noqa: F401

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected