File: test_coverup_14.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 (23 lines) | stat: -rw-r--r-- 880 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# file scalene/scalene_signals.py:61-77
# lines [61, 70, 71, 72, 73, 74, 75, 76]
# branches []

import pytest
from scalene.scalene_signals import ScaleneSignals

@pytest.fixture
def scalene_signals():
    return ScaleneSignals()

def test_get_all_signals(scalene_signals):
    signals = scalene_signals.get_all_signals()
    assert isinstance(signals, list)
    assert all(isinstance(signal, int) for signal in signals)
    # Assuming the signals are unique, which they should be
    assert len(signals) == len(set(signals))
    # Check that cpu_signal is included in the list
    assert scalene_signals.cpu_signal in signals
    # Check that the list does not include the CPU timer signal
    # Assuming cpu_timer_signal is an attribute of ScaleneSignals
    # Uncomment the following line if such an attribute exists
    # assert scalene_signals.cpu_timer_signal not in signals