diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2017-03-12 04:10:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-12 04:10:07 (GMT) |
commit | 93710c152e6bcfffdf2f1f15bb5f75b013aef422 (patch) | |
tree | d62e4a4e89ca851a3cc6c55c71948d8b5890c777 /Lib/test/test_site.py | |
parent | 482f7a274fa52b7ba34ff308cd9acdcac9f41ba5 (diff) | |
download | cpython-93710c152e6bcfffdf2f1f15bb5f75b013aef422.zip cpython-93710c152e6bcfffdf2f1f15bb5f75b013aef422.tar.gz cpython-93710c152e6bcfffdf2f1f15bb5f75b013aef422.tar.bz2 |
bpo-29763: Use support.unlink instead of os.unlink (GH-624)
support.unlink waits for the files to be removed before returning
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 0620b24..342ec9e 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): |