Debian Codegraph @

tests/test_coverup_54.py

raw symbols SCIP
1 # file scalene/scalene_arguments.py:6-49
2 # lines [10, 11, 12, 13, 14, 15, 17, 19, 20, 23, 24, 25, 26, 28, 29, 30, 32, 34, 36, 38, 40, 42, 44, 45, 46, 47, 48, 49]
3 # branches []
4
5 import argparse
6 import platform
7 import sys
8 from unittest.mock import patch
9 import pytest
10 from scalene.scalene_arguments import ScaleneArguments
11
12
13 @pytest.fixture
14 def clean_scalene_arguments():
15 # Fixture to create a clean ScaleneArguments instance
16 yield ScaleneArguments()
17 # No cleanup needed as each test gets a fresh instance
18
19
20 def test_scalene_arguments_initialization(clean_scalene_arguments):
21 args = clean_scalene_arguments
22 assert args.cpu == True
23 assert args.memory == (sys.platform != "win32")
24 assert args.stacks == False
25 assert args.cpu_percent_threshold == 1
26 assert args.cpu_sampling_rate == 0.01
27 assert args.allocation_sampling_window == 10485767
28 assert args.html == False
29 assert args.json == False
30 assert args.column_width == 132
31 assert args.malloc_threshold == 100
32 assert args.outfile == None
33 assert args.pid == 0
34 assert args.profile_all == False
35 assert args.profile_interval == float("inf")
36 assert args.profile_only == ""
37 assert args.profile_exclude == ""
38 assert args.program_path == ""
39 assert args.reduced_profile == False
40 assert args.use_virtual_time == False
41 assert args.memory_leak_detector == True
42 assert args.web == True
43 assert args.no_browser == False
44 assert args.port == 8088
45 assert args.cli == False