1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
# file scalene/scalene_profiler.py:313-316
# lines [316]
# branches []
import pytest
import scalene.scalene_config
from scalene.scalene_profiler import Scalene
@pytest.fixture(scope="function")
def reset_scalene_config():
# Store original value to restore after test
original_trigger_length = scalene.scalene_config.NEWLINE_TRIGGER_LENGTH
yield
# Restore original value
scalene.scalene_config.NEWLINE_TRIGGER_LENGTH = original_trigger_length
def test_update_line_executes_line_316(reset_scalene_config):
# Set the trigger length to a non-zero value to ensure the bytearray is created
scalene.scalene_config.NEWLINE_TRIGGER_LENGTH = 1
# Call the method that should execute line 316
Scalene.update_line()
# No specific postconditions to assert; the test is for coverage of line 316
|