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

Method test_remove_OSError

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

Source from the content-addressed store, hash-verified

777
778 @patch('os.unlink')
779 def test_remove_OSError(self, unlink):
780 exc = OSError()
781 exc.errno = errno.EAGAIN
782 unlink.side_effect = exc
783 p = Pidfile('/var/pid')
784 with pytest.raises(OSError):
785 p.remove()
786 unlink.assert_called_with(p.path)
787
788 @patch('os.kill')
789 def test_remove_if_stale_process_alive(self, kill):

Callers

nothing calls this directly

Calls 3

removeMethod · 0.95
PidfileClass · 0.90
raisesMethod · 0.80

Tested by

no test coverage detected