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

Function test_safe_getattr

testing/test_compat.py:174–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172
173
174def test_safe_getattr() -> None:
175 helper = ErrorsHelper()
176 assert safe_getattr(helper, "raise_exception", "default") == "default"
177 assert safe_getattr(helper, "raise_fail_outcome", "default") == "default"
178 with pytest.raises(BaseException):
179 assert safe_getattr(helper, "raise_baseexception", "default")
180
181
182def test_safe_isclass() -> None:

Callers

nothing calls this directly

Calls 2

safe_getattrFunction · 0.90
ErrorsHelperClass · 0.85

Tested by

no test coverage detected