File: test_coverup_99.py

package info (click to toggle)
scalene 1.5.51-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,528 kB
  • sloc: cpp: 22,930; python: 13,403; javascript: 11,769; ansic: 817; makefile: 196; sh: 45
file content (20 lines) | stat: -rw-r--r-- 572 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# file scalene/scalene_statistics.py:238-240
# lines [240]
# branches []

import time
from scalene.scalene_statistics import ScaleneStatistics
import pytest

@pytest.fixture
def scalene_statistics():
    stats = ScaleneStatistics()
    yield stats
    # No specific cleanup needed after the test

def test_start_clock(scalene_statistics):
    before_time = time.time()
    scalene_statistics.start_clock()
    after_time = time.time()
    # Assert that start_time is between before_time and after_time
    assert before_time <= scalene_statistics.start_time <= after_time