Try to fix test.test_support.rmtree() on Windows for fixing issue28847 tests.
This commit is contained in:
parent
1d2cfe263c
commit
7653c3806c
|
@ -239,9 +239,9 @@ if sys.platform.startswith("win"):
|
||||||
fullname = os.path.join(path, name)
|
fullname = os.path.join(path, name)
|
||||||
if os.path.isdir(fullname):
|
if os.path.isdir(fullname):
|
||||||
_waitfor(_rmtree_inner, fullname, waitall=True)
|
_waitfor(_rmtree_inner, fullname, waitall=True)
|
||||||
_force_run(path, os.rmdir, fullname)
|
_force_run(fullname, os.rmdir, fullname)
|
||||||
else:
|
else:
|
||||||
_force_run(path, os.unlink, fullname)
|
_force_run(fullname, os.unlink, fullname)
|
||||||
_waitfor(_rmtree_inner, path, waitall=True)
|
_waitfor(_rmtree_inner, path, waitall=True)
|
||||||
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
|
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue