Skip to content

Commit 79e3121

Browse files
committed
add env cleanup
1 parent d7d5e87 commit 79e3121

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
MockThreadInfo,
2525
MockInterpreterInfo,
2626
)
27+
from .helpers import close_and_unlink
2728

2829

2930
class TestLiveStatsCollectorWithMockDisplay(unittest.TestCase):
@@ -865,6 +866,7 @@ def test_run_failed_module_live(self):
865866
def test_run_failed_script_live(self):
866867
"""Test that running a failing script exits with clean error."""
867868
script = tempfile.NamedTemporaryFile(suffix=".py")
869+
self.addCleanup(close_and_unlink, script)
868870
script.write(b'1/0\n')
869871
script.seek(0)
870872

0 commit comments

Comments
 (0)