mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
bpo-29763: Use support.unlink instead of os.unlink (GH-624)
support.unlink waits for the files to be removed before returning
This commit is contained in:
parent
482f7a274f
commit
93710c152e
1 changed files with 4 additions and 4 deletions
|
|
@ -501,15 +501,15 @@ class StartupImportTests(unittest.TestCase):
|
||||||
print(line, file=f)
|
print(line, file=f)
|
||||||
return exe_file
|
return exe_file
|
||||||
except:
|
except:
|
||||||
os.unlink(_pth_file)
|
test.support.unlink(_pth_file)
|
||||||
os.unlink(exe_file)
|
test.support.unlink(exe_file)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _cleanup_underpth_exe(self, exe_file):
|
def _cleanup_underpth_exe(self, exe_file):
|
||||||
_pth_file = os.path.splitext(exe_file)[0] + '._pth'
|
_pth_file = os.path.splitext(exe_file)[0] + '._pth'
|
||||||
os.unlink(_pth_file)
|
test.support.unlink(_pth_file)
|
||||||
os.unlink(exe_file)
|
test.support.unlink(exe_file)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _calc_sys_path_for_underpth_nosite(self, sys_prefix, lines):
|
def _calc_sys_path_for_underpth_nosite(self, sys_prefix, lines):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue