Refs #31407 -- Handled potential exception in test cleanup.
The test view may not be called when running the tests with --parallel=2 or greater. Catch the AttributeError for this case.
This commit is contained in:
parent
f7e0bffa2e
commit
236e6cb588
|
@ -63,7 +63,11 @@ class CoroutineClearingView:
|
|||
return self._unawaited_coroutine
|
||||
|
||||
def __del__(self):
|
||||
try:
|
||||
self._unawaited_coroutine.close()
|
||||
except AttributeError:
|
||||
# View was never called.
|
||||
pass
|
||||
|
||||
|
||||
async_unawaited = CoroutineClearingView()
|
||||
|
|
Loading…
Reference in New Issue