| 32 | assert not x.maxrate |
| 33 | |
| 34 | def test_install_timers(self): |
| 35 | x = Polaroid(self.state, app=self.app) |
| 36 | x.timer = timer |
| 37 | x.__exit__() |
| 38 | x.__enter__() |
| 39 | assert x.capture in MockTimer.installed |
| 40 | assert x.cleanup in MockTimer.installed |
| 41 | x._tref.cancel.assert_not_called() |
| 42 | x._ctref.cancel.assert_not_called() |
| 43 | x.__exit__() |
| 44 | x._tref.cancel.assert_called() |
| 45 | x._ctref.cancel.assert_called() |
| 46 | x._tref.assert_called() |
| 47 | x._ctref.assert_not_called() |
| 48 | |
| 49 | def test_cleanup(self): |
| 50 | x = Polaroid(self.state, app=self.app) |