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

Function test_attribute_failure

doc/en/example/assertion/failure_demo.py:138–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137
138def test_attribute_failure():
139 class Foo:
140 def _get_b(self):
141 raise Exception("Failed to get attrib")
142
143 b = property(_get_b)
144
145 i = Foo()
146 assert i.b == 2
147
148
149def test_attribute_multiple():

Callers

nothing calls this directly

Calls 1

FooClass · 0.70

Tested by

no test coverage detected