We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b42812e commit 8d9cbfeCopy full SHA for 8d9cbfe
Lib/test/test_sample_profiler.py
@@ -1610,8 +1610,9 @@ def test_is_process_running(self):
1610
profiler = SampleProfiler(pid=proc.pid, sample_interval_usec=1000, all_threads=False)
1611
1612
self.assertTrue(profiler._is_process_running())
1613
- proc.wait()
1614
- self.assertFalse(profiler._is_process_running())
+
+ # Exit the context manager to ensure the process is terminated
1615
+ self.assertFalse(profiler._is_process_running())
1616
1617
@unittest.skipUnless(sys.platform == "linux", "Only valid on Linux")
1618
def test_esrch_signal_handling(self):
0 commit comments