MCPcopy
hub / github.com/celery/celery / test_stop

Method test_stop

t/unit/worker/test_control.py:73–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71class test_Pidbox_green:
72
73 def test_stop(self):
74 parent = Mock()
75 g = gPidbox(parent)
76 stopped = g._node_stopped = Mock()
77 shutdown = g._node_shutdown = Mock()
78 close_chan = g._close_channel = Mock()
79
80 g.stop(parent)
81 shutdown.set.assert_called_with()
82 stopped.wait.assert_called_with()
83 close_chan.assert_called_with(parent)
84 assert g._node_stopped is None
85 assert g._node_shutdown is None
86
87 close_chan.reset()
88 g.stop(parent)
89 close_chan.assert_called_with(parent)
90
91 def test_resets(self):
92 parent = Mock()

Callers

nothing calls this directly

Calls 3

gPidboxClass · 0.90
stopMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected