File: test_coverup_60.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 (17 lines) | stat: -rw-r--r-- 488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# file scalene/scalene_analysis.py:136-202
# lines [196]
# branches ['187->196']

import pytest
from scalene.scalene_analysis import ScaleneAnalysis

@pytest.fixture
def cleanup():
    # Fixture to perform cleanup after tests
    yield
    # No cleanup actions needed for this test

def test_find_outermost_loop_single_line(cleanup):
    src = "x = 1"
    result = ScaleneAnalysis.find_outermost_loop(src)
    assert result == {1: (1, 1)}, "The result should map line 1 to region (1, 1)"