Debian Codegraph @

tests/test_coverup_46.py

raw symbols SCIP
1 # file scalene/scalene_client_timer.py:38-40
2 # lines [40]
3 # branches []
4
5 import pytest
6 from scalene.scalene_client_timer import ScaleneClientTimer
7
8
9 @pytest.fixture
10 def scalene_client_timer():
11 return ScaleneClientTimer()
12
13
14 def test_get_itimer(scalene_client_timer):
15 # Assuming ScaleneClientTimer has attributes `seconds` and `interval` that can be set.
16 # If these attributes do not exist, they should be added to the class for this test to work.
17 expected_seconds = 1.0
18 expected_interval = 0.1
19 scalene_client_timer.seconds = expected_seconds
20 scalene_client_timer.interval = expected_interval
21
22 seconds, interval = scalene_client_timer.get_itimer()
23
24 assert seconds == expected_seconds, "The returned seconds value is incorrect."
25 assert interval == expected_interval, "The returned interval value is incorrect."