From: Zachary Ware Date: Sun, 12 Mar 2017 04:39:54 +0000 (-0600) Subject: bpo-29763: Use support.unlink instead of os.unlink (GH-624) (GH-625) X-Git-Tag: v3.6.2rc1~327 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c6d6e056460753c916348feee0e4916a97d7c86;p=thirdparty%2FPython%2Fcpython.git bpo-29763: Use support.unlink instead of os.unlink (GH-624) (GH-625) support.unlink waits for the files to be removed before returning --- diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 0620b2427660..342ec9e43d5d 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -501,15 +501,15 @@ class StartupImportTests(unittest.TestCase): print(line, file=f) return exe_file except: - os.unlink(_pth_file) - os.unlink(exe_file) + test.support.unlink(_pth_file) + test.support.unlink(exe_file) raise @classmethod def _cleanup_underpth_exe(self, exe_file): _pth_file = os.path.splitext(exe_file)[0] + '._pth' - os.unlink(_pth_file) - os.unlink(exe_file) + test.support.unlink(_pth_file) + test.support.unlink(exe_file) @classmethod def _calc_sys_path_for_underpth_nosite(self, sys_prefix, lines):