MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / MyError

Class MyError

example_code/item_111.py:130–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128print("Example 9")
129try:
130 class MyError(Exception):
131 pass
132
133 mock = Mock(spec=get_animals)
134 mock.side_effect = MyError("Whoops! Big problem")

Callers 1

item_111.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected