diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-04-25 00:11:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 00:11:09 (GMT) |
commit | f6448e5d65c349576df6e83b8324b9c208e77615 (patch) | |
tree | bc46bfb34a8e78ba9017d637d4ec3a8c39b0fe08 /Lib/distutils | |
parent | 0d659e5614cad512a1940125135b443b3eecb5d7 (diff) | |
download | cpython-f6448e5d65c349576df6e83b8324b9c208e77615.zip cpython-f6448e5d65c349576df6e83b8324b9c208e77615.tar.gz cpython-f6448e5d65c349576df6e83b8324b9c208e77615.tar.bz2 |
bpo-30132: distutils test_build_ext() uses temp_cwd() (#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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index be7f5f3..96e5f03 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -41,6 +41,13 @@ class BuildExtTestCase(TempdirManager, return build_ext(*args, **kwargs) def test_build_ext(self): + # bpo-30132: On Windows, a .pdb file may be created in the current + # working directory. Create a temporary working directory to cleanup + # everything at the end of the test. + with support.temp_cwd(): + self._test_build_ext() + + def _test_build_ext(self): cmd = support.missing_compiler_executable() if cmd is not None: self.skipTest('The %r command is not found' % cmd) |