From 0da0123f67b01f8906593646967b3ab6c0f64756 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 16 Apr 2024 15:41:29 +0300 Subject: [PATCH] gh-117879: Fix test_httpservers for the build with profiling --- Lib/test/test_httpservers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 7c0edfea4f9778..1c370dcafa9fea 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -815,6 +815,9 @@ def tearDown(self): os.rmdir(self.cgi_dir_in_sub_dir) os.rmdir(self.sub_dir_2) os.rmdir(self.sub_dir_1) + # The 'gmon.out' file can be written in the current working + # directory if C-level code profiling with gprof is enabled. + os_helper.unlink(os.path.join(self.parent_dir, 'gmon.out')) os.rmdir(self.parent_dir) finally: BaseTestCase.tearDown(self)