MCPcopy
hub / github.com/celery/celery / test_install_timers

Method test_install_timers

t/unit/events/test_snapshot.py:34–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32 assert not x.maxrate
33
34 def test_install_timers(self):
35 x = Polaroid(self.state, app=self.app)
36 x.timer = timer
37 x.__exit__()
38 x.__enter__()
39 assert x.capture in MockTimer.installed
40 assert x.cleanup in MockTimer.installed
41 x._tref.cancel.assert_not_called()
42 x._ctref.cancel.assert_not_called()
43 x.__exit__()
44 x._tref.cancel.assert_called()
45 x._ctref.cancel.assert_called()
46 x._tref.assert_called()
47 x._ctref.assert_not_called()
48
49 def test_cleanup(self):
50 x = Polaroid(self.state, app=self.app)

Callers

nothing calls this directly

Calls 3

__exit__Method · 0.95
__enter__Method · 0.95
PolaroidClass · 0.90

Tested by

no test coverage detected