Debian Codegraph @

tests/test_coverup_41.py

raw symbols SCIP
1 # file scalene/runningstats.py:55-57
2 # lines [57]
3 # branches []
4
5 import pytest
6 from scalene.runningstats import RunningStats
7
8
9 @pytest.fixture
10 def running_stats():
11 return RunningStats()
12
13
14 def test_size(running_stats):
15 assert running_stats.size() == 0 # Initially, the size should be 0
16 running_stats.push(1)
17 assert running_stats.size() == 1 # After pushing one element, the size should be 1
18 running_stats.push(2)
19 assert (
20 running_stats.size() == 2
21 ) # After pushing another element, the size should be 2