MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / test_bad_attribute

Method test_bad_attribute

Solutions/6_2/teststock.py:64–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 s.price = -45.23
63
64 def test_bad_attribute(self):
65 s = stock.Stock('GOOG', 100, 490.1)
66 with self.assertRaises(AttributeError):
67 s.share = 100
68
69if __name__ == '__main__':
70 unittest.main()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected