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

Method test_sell

Solutions/7_3/teststock.py:23–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

21 self.assertEqual(s.cost, 49010.0)
22
23 def test_sell(self):
24 s = stock.Stock('GOOG', 100, 490.1)
25 s.sell(25)
26 self.assertEqual(s.shares, 75)
27
28 def test_from_row(self):
29 s = stock.Stock.from_row(['GOOG','100','490.1'])

Callers

nothing calls this directly

Calls 1

sellMethod · 0.95

Tested by

no test coverage detected