MCPcopy
hub / github.com/celery/celery / test_blockdetection

Function test_blockdetection

t/unit/utils/test_debug.py:16–22  ·  view source on GitHub ↗
(patching)

Source from the content-addressed store, hash-verified

14
15
16def test_blockdetection(patching):
17 signals = patching('celery.utils.debug.signals')
18 with debug.blockdetection(10):
19 signals.arm_alarm.assert_called_with(10)
20 signals.__setitem__.assert_called_with('ALRM', debug._on_blocking)
21 signals.__setitem__.assert_called_with('ALRM', signals['ALRM'])
22 signals.reset_alarm.assert_called_with()
23
24
25def test_sample_mem(patching):

Callers

nothing calls this directly

Calls 1

patchingFunction · 0.85

Tested by

no test coverage detected