Skip to content

Commit 866b8fd

Browse files
committed
this?
1 parent e0805d0 commit 866b8fd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_profiling/test_sampling_profiler/test_collectors.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,6 +2659,7 @@ def test_gecko_collector_opcodes_enabled(self):
26592659
def test_gecko_opcode_state_tracking(self):
26602660
"""Test that GeckoCollector tracks opcode state changes."""
26612661
collector = GeckoCollector(sample_interval_usec=1000, opcodes=True)
2662+
self.addCleanup(lambda: collector.spill_dir.cleanup())
26622663

26632664
# First sample with opcode 90 (RAISE_VARARGS)
26642665
frame1 = MockFrameInfo("test.py", 10, "func", opcode=90)
@@ -2680,6 +2681,7 @@ def test_gecko_opcode_state_tracking(self):
26802681
def test_gecko_opcode_state_change_emits_marker(self):
26812682
"""Test that opcode state change emits an interval marker."""
26822683
collector = GeckoCollector(sample_interval_usec=1000, opcodes=True)
2684+
self.addCleanup(lambda: collector.spill_dir.cleanup())
26832685

26842686
# First sample: opcode 90
26852687
frame1 = MockFrameInfo("test.py", 10, "func", opcode=90)
@@ -2707,6 +2709,7 @@ def test_gecko_opcode_state_change_emits_marker(self):
27072709
def test_gecko_opcode_markers_not_emitted_when_disabled(self):
27082710
"""Test that no opcode markers when opcodes=False."""
27092711
collector = GeckoCollector(sample_interval_usec=1000, opcodes=False)
2712+
self.addCleanup(lambda: collector.spill_dir.cleanup())
27102713

27112714
frame1 = MockFrameInfo("test.py", 10, "func", opcode=90)
27122715
frames1 = [
@@ -2732,6 +2735,7 @@ def test_gecko_opcode_markers_not_emitted_when_disabled(self):
27322735
def test_gecko_opcode_with_none_opcode(self):
27332736
"""Test that None opcode doesn't cause issues."""
27342737
collector = GeckoCollector(sample_interval_usec=1000, opcodes=True)
2738+
self.addCleanup(lambda: collector.spill_dir.cleanup())
27352739

27362740
# Frame with no opcode (None)
27372741
frame = MockFrameInfo("test.py", 10, "func", opcode=None)

0 commit comments

Comments
 (0)