| 1 | # file scalene/runningstats.py:51-53 |
| 2 | # lines [53] |
| 3 | # branches [] |
| 4 | |
| 5 | import pytest |
| 6 | from scalene.runningstats import RunningStats |
| 7 | |
| 8 | |
| 9 | def test_peak(): |
| 10 | stats = RunningStats() |
| 11 | stats.push(10) |
| 12 | stats.push(20) |
| 13 | stats.push(5) |
| 14 | assert stats.peak() == 20, "The peak value should be the maximum value pushed" |
| 15 | |
| 16 | # Clean up |
| 17 | del stats |