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

Function test_safe_isclass

testing/test_compat.py:182–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181
182def test_safe_isclass() -> None:
183 assert safe_isclass(type) is True
184
185 class CrappyClass(Exception):
186 # Type ignored because it's bypassed intentionally.
187 @property # type: ignore
188 def __class__(self):
189 assert False, "Should be ignored"
190
191 assert safe_isclass(CrappyClass()) is False
192
193
194def test_cached_property() -> None:

Callers

nothing calls this directly

Calls 2

safe_isclassFunction · 0.90
CrappyClassClass · 0.70

Tested by

no test coverage detected