MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / test_end

Method test_end

example_code/item_109.py:116–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

114 timer.countdown.assert_called_once_with(30, toaster.pop_up)
115
116 def test_end(self):
117 timer = Mock(spec=ReusableTimer)
118 toaster = Toaster(timer)
119 toaster.hot = True
120 toaster.pop_up()
121 self.assertFalse(toaster.hot)
122 timer.end.assert_called_once()
123
124import unittest
125

Callers

nothing calls this directly

Calls 2

pop_upMethod · 0.95
ToasterClass · 0.85

Tested by

no test coverage detected