MCPcopy Index your code
hub / github.com/dabeaz-course/python-mastery / test_from_row

Method test_from_row

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

Source from the content-addressed store, hash-verified

26 self.assertEqual(s.shares, 75)
27
28 def test_from_row(self):
29 s = stock.Stock.from_row(['GOOG','100','490.1'])
30 self.assertEqual(s.name, 'GOOG')
31 self.assertEqual(s.shares, 100)
32 self.assertEqual(s.price, 490.1)
33
34 def test_repr(self):
35 s = stock.Stock('GOOG', 100, 490.1)

Callers

nothing calls this directly

Calls 1

from_rowMethod · 0.45

Tested by

no test coverage detected