Skip to content

Commit

Permalink
bpo-29763: Use support.unlink instead of os.unlink (pythonGH-624)
Browse files Browse the repository at this point in the history
support.unlink waits for the files to be removed before returning
  • Loading branch information
zware authored Mar 12, 2017
1 parent 482f7a2 commit 93710c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,15 @@ def _create_underpth_exe(self, lines):
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):
Expand Down

0 comments on commit 93710c1

Please sign in to comment.