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

Method test_eq

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

Source from the content-addressed store, hash-verified

36 self.assertEqual(repr(s), "Stock('GOOG', 100, 490.1)")
37
38 def test_eq(self):
39 a = stock.Stock('GOOG', 100, 490.1)
40 b = stock.Stock('GOOG', 100, 490.1)
41 self.assertTrue(a==b)
42
43 # Tests for failure conditions
44 def test_shares_badtype(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected