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

Method test_context

t/unit/utils/test_platforms.py:688–696  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

686 assert ret is p
687
688 def test_context(self):
689 p = Pidfile('/var/pid')
690 p.write_pid = Mock()
691 p.remove = Mock()
692
693 with p as _p:
694 assert _p is p
695 p.write_pid.assert_called_with()
696 p.remove.assert_called_with()
697
698 def test_acquire_raises_LockFailed(self):
699 p = Pidfile('/var/pid')

Callers

nothing calls this directly

Calls 1

PidfileClass · 0.90

Tested by

no test coverage detected