Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/practical-python
/ test_sell
Method
test_sell
Solutions/8_1/test_stock.py:17–20 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
15
self.assertEqual(s.cost, 49010.0)
16
17
def
test_sell(self):
18
s = stock.Stock(
'GOOG'
, 100, 490.1)
19
s.sell(25)
20
self.assertEqual(s.shares, 75)
21
22
def
test_shares_check(self):
23
s = stock.Stock(
'GOOG'
, 100, 490.1)
Callers
nothing calls this directly
Calls
1
sell
Method · 0.95
Tested by
no test coverage detected