MCPcopy Create free account
hub / github.com/celery/celery / test_crash

Method test_crash

t/unit/utils/test_threads.py:153–166  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151class test_bgThread:
152
153 def test_crash(self):
154
155 class T(bgThread):
156
157 def body(self):
158 raise KeyError()
159
160 with patch('os._exit') as _exit:
161 with conftest.stdouts():
162 _exit.side_effect = ValueError()
163 t = T()
164 with pytest.raises(ValueError):
165 t.run()
166 _exit.assert_called_with(1)
167
168 def test_interface(self):
169 x = bgThread()

Callers

nothing calls this directly

Calls 3

runMethod · 0.95
raisesMethod · 0.80
TClass · 0.70

Tested by

no test coverage detected