(self, unlink)
| 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): |