MCPcopy Create free account
hub / github.com/dabeaz-course/practical-python / test_create

Method test_create

Solutions/8_1/test_stock.py:7–11  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5
6class TestStock(unittest.TestCase):
7 def test_create(self):
8 s = stock.Stock('GOOG', 100, 490.1)
9 self.assertEqual(s.name, 'GOOG')
10 self.assertEqual(s.shares, 100)
11 self.assertEqual(s.price, 490.1)
12
13 def test_cost(self):
14 s = stock.Stock('GOOG', 100, 490.1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected