Skip to content

Commit f6448e5

Browse files
authored
bpo-30132: distutils test_build_ext() uses temp_cwd() (python#1278)
test_build_ext() of test_distutils now uses support.temp_cwd() to prevent the creation of a pdb file in the current working directory on Windows.
1 parent 0d659e5 commit f6448e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/distutils/tests/test_build_ext.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ def build_ext(self, *args, **kwargs):
4141
return build_ext(*args, **kwargs)
4242

4343
def test_build_ext(self):
44+
# bpo-30132: On Windows, a .pdb file may be created in the current
45+
# working directory. Create a temporary working directory to cleanup
46+
# everything at the end of the test.
47+
with support.temp_cwd():
48+
self._test_build_ext()
49+
50+
def _test_build_ext(self):
4451
cmd = support.missing_compiler_executable()
4552
if cmd is not None:
4653
self.skipTest('The %r command is not found' % cmd)

0 commit comments

Comments
 (0)