mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
test_threaded_import must clean up after itself
This commit is contained in:
parent
f26ad7149f
commit
075050f84f
2 changed files with 16 additions and 9 deletions
|
@ -35,8 +35,12 @@ for name, func, args in [
|
|||
("os.path.abspath", os.path.abspath, ('.',)),
|
||||
]:
|
||||
|
||||
t = Worker(func, args)
|
||||
t.start()
|
||||
t.join(TIMEOUT)
|
||||
if t.is_alive():
|
||||
errors.append("%s appeared to hang" % name)
|
||||
try:
|
||||
t = Worker(func, args)
|
||||
t.start()
|
||||
t.join(TIMEOUT)
|
||||
if t.is_alive():
|
||||
errors.append("%s appeared to hang" % name)
|
||||
finally:
|
||||
del t
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue