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

Method test_end

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

Source from the content-addressed store, hash-verified

144 timer.timer.start.assert_called_once()
145
146 def test_end(self):
147 my_func = lambda: None
148 with mock.patch("threading.Timer"):
149 timer = ReusableTimer()
150 timer.countdown(0.1, my_func)
151 timer.end()
152 timer.timer.cancel.assert_called_once()
153
154import unittest
155

Callers

nothing calls this directly

Calls 3

countdownMethod · 0.95
endMethod · 0.95
ReusableTimerClass · 0.85

Tested by

no test coverage detected