File tree Expand file tree Collapse file tree
test/test_profiling/test_sampling_profiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,5 @@ select = [
1111[lint .per-file-ignores ]
1212"ctypes/__init__.py" = [" F401" ] # Re-exports from _ctypes
1313"importlib/metadata/__init__.py" = [" F401" ] # Synced from importlib_metadata
14- "profiling/sampling/sample.py" = [" F401" ] # Re-exports PROFILING_MODE_* constants
1514"ssl.py" = [" F401" ] # Re-exports from _ssl
1615"warnings.py" = [" F401" ] # Re-exports from _py_warnings
Original file line number Diff line number Diff line change @@ -26,10 +26,7 @@ def _pause_threads(unwinder, blocking):
2626
2727from .constants import (
2828 PROFILING_MODE_WALL ,
29- PROFILING_MODE_CPU ,
30- PROFILING_MODE_GIL ,
3129 PROFILING_MODE_ALL ,
32- PROFILING_MODE_EXCEPTION ,
3330)
3431from ._format_utils import fmt
3532try :
Original file line number Diff line number Diff line change 1010 import profiling .sampling .sample
1111 from profiling .sampling .pstats_collector import PstatsCollector
1212 from profiling .sampling .cli import main , _parse_mode
13- from profiling .sampling .constants import PROFILING_MODE_EXCEPTION
13+ from profiling .sampling .constants import (
14+ PROFILING_MODE_CPU ,
15+ PROFILING_MODE_EXCEPTION ,
16+ PROFILING_MODE_GIL ,
17+ PROFILING_MODE_WALL ,
18+ )
1419 from _remote_debugging import (
1520 THREAD_STATUS_HAS_GIL ,
1621 THREAD_STATUS_ON_CPU ,
@@ -392,9 +397,9 @@ def gil_holding_work():
392397
393398 def test_mode_constants_are_defined (self ):
394399 """Test that all profiling mode constants are properly defined."""
395- self .assertEqual (profiling . sampling . sample . PROFILING_MODE_WALL , 0 )
396- self .assertEqual (profiling . sampling . sample . PROFILING_MODE_CPU , 1 )
397- self .assertEqual (profiling . sampling . sample . PROFILING_MODE_GIL , 2 )
400+ self .assertEqual (PROFILING_MODE_WALL , 0 )
401+ self .assertEqual (PROFILING_MODE_CPU , 1 )
402+ self .assertEqual (PROFILING_MODE_GIL , 2 )
398403
399404 def test_parse_mode_function (self ):
400405 """Test the _parse_mode function with all valid modes."""
You can’t perform that action at this time.
0 commit comments