Skip to content

Commit 8429b45

Browse files
pythongh-117879: Fix test_httpservers for the build with profiling (pythonGH-117932)
1 parent 8515fd7 commit 8429b45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_httpservers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,9 @@ def tearDown(self):
815815
os.rmdir(self.cgi_dir_in_sub_dir)
816816
os.rmdir(self.sub_dir_2)
817817
os.rmdir(self.sub_dir_1)
818+
# The 'gmon.out' file can be written in the current working
819+
# directory if C-level code profiling with gprof is enabled.
820+
os_helper.unlink(os.path.join(self.parent_dir, 'gmon.out'))
818821
os.rmdir(self.parent_dir)
819822
finally:
820823
BaseTestCase.tearDown(self)

0 commit comments

Comments
 (0)