mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-28 16:04:55 +03:00
Handle PermissionError in Windows CI
This commit is contained in:
parent
b48f2e1494
commit
522b0edc8c
|
@ -218,6 +218,7 @@ def test_project_run_multiprocessing_failure(failing_command: str):
|
||||||
with a non-zero return code, the other two commands after several seconds with
|
with a non-zero return code, the other two commands after several seconds with
|
||||||
zero return codes. Measuring the execution length for the whole group shows
|
zero return codes. Measuring the execution length for the whole group shows
|
||||||
whether or not the sleeping processes were successfully terminated."""
|
whether or not the sleeping processes were successfully terminated."""
|
||||||
|
try:
|
||||||
with make_tempdir() as d:
|
with make_tempdir() as d:
|
||||||
|
|
||||||
pscript = """
|
pscript = """
|
||||||
|
@ -267,9 +268,11 @@ sys.exit(int(rc))
|
||||||
else:
|
else:
|
||||||
assert rc_e.value.code == 1
|
assert rc_e.value.code == 1
|
||||||
time_taken = time() - start
|
time_taken = time() - start
|
||||||
print("time_taken:", time_taken)
|
|
||||||
assert (
|
assert (
|
||||||
time_taken < 15
|
time_taken < 15
|
||||||
), "Test took {time_taken}, subprocess seems not to have been terminated"
|
), "Test took {time_taken}, subprocess seems not to have been terminated"
|
||||||
|
except PermissionError: # occurs on Windows in the CI because the terminated subprocess still has
|
||||||
|
# a handle on the temporary directory
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user