MCPcopy
hub / github.com/celery/celery / test_remove_OSError

Method test_remove_OSError

t/unit/utils/test_platforms.py:629–636  ·  view source on GitHub ↗
(self, unlink)

Source from the content-addressed store, hash-verified

627
628 @patch('os.unlink')
629 def test_remove_OSError(self, unlink):
630 exc = OSError()
631 exc.errno = errno.EAGAIN
632 unlink.side_effect = exc
633 p = Pidfile('/var/pid')
634 with pytest.raises(OSError):
635 p.remove()
636 unlink.assert_called_with(p.path)
637
638 @patch('os.kill')
639 def test_remove_if_stale_process_alive(self, kill):

Callers

nothing calls this directly

Calls 3

removeMethod · 0.95
PidfileClass · 0.90
raisesMethod · 0.45

Tested by

no test coverage detected