(self)
| 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') |