Test stop/flush.
()
| 35 | |
| 36 | |
| 37 | def test_timer_flush_stop(): |
| 38 | """Test stop/flush.""" |
| 39 | t = common.Timer() |
| 40 | t.start() |
| 41 | with pytest.raises(RuntimeError): |
| 42 | t.flush() |
| 43 | t.stop() |
| 44 | t.resume() |
| 45 | with pytest.raises(RuntimeError): |
| 46 | t.flush() |
| 47 | t.stop() |
| 48 | t.flush() |
| 49 | |
| 50 | |
| 51 | def test_context_manager_named(): |