From: Victor Stinner Date: Tue, 2 May 2017 21:43:25 +0000 (+0200) Subject: bpo-30223: Add global in regrtest main_in_temp_cwd (#1399) X-Git-Tag: v2.7.14rc1~188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8105dd7f75b6aa5f812522d452cd378372752a10;p=python bpo-30223: Add global in regrtest main_in_temp_cwd (#1399) --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index cbd9185257..5702e38f45 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -1647,6 +1647,8 @@ class _ExpectedSkips: def main_in_temp_cwd(): """Run main() in a temporary working directory.""" + global TEMPDIR + # When tests are run from the Python build directory, it is best practice # to keep the test files in a subfolder. It eases the cleanup of leftover # files using command "make distclean".