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

Function test_private_is_deprecated

testing/deprecated_test.py:131–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130
131def test_private_is_deprecated() -> None:
132 class PrivateInit:
133 def __init__(self, foo: int, *, _ispytest: bool = False) -> None:
134 deprecated.check_ispytest(_ispytest)
135
136 with pytest.warns(
137 pytest.PytestDeprecationWarning, match="private pytest class or function"
138 ):
139 PrivateInit(10)
140
141 # Doesn't warn.
142 PrivateInit(10, _ispytest=True)
143
144
145def test_raising_unittest_skiptest_during_collection_is_deprecated(

Callers

nothing calls this directly

Calls 1

PrivateInitClass · 0.85

Tested by

no test coverage detected