]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117879: Fix test_httpservers for the build with profiling (GH-117932)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 17 Apr 2024 09:50:07 +0000 (12:50 +0300)
committerGitHub <noreply@github.com>
Wed, 17 Apr 2024 09:50:07 +0000 (12:50 +0300)
Lib/test/test_httpservers.py

index 7c0edfea4f977828a924c2d1a906a534813f78ee..1c370dcafa9fea016b49395c8aa7460d9660b622 100644 (file)
@@ -815,6 +815,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)