]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-117879: Fix test_httpservers for the build with profiling (GH-117932) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 17 Apr 2024 10:15:22 +0000 (12:15 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Apr 2024 10:15:22 +0000 (10:15 +0000)
(cherry picked from commit 8429b4565deaef7a86bffc0ce58bc0eab1d7ae48)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_httpservers.py

index 15f944734c608ef3938316bd68a7b7f36d8d1557..88d06fe04fb7269ead91f4716cb4e4a57e9c7fd1 100644 (file)
@@ -808,6 +808,9 @@ class CGIHTTPServerTestCase(BaseTestCase):
             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)