tests: do not leak objects in object leaks checking function
If any object is leaked, QubesTestCase.cleanup_gc() raises an exception, which have leaked objects list referenced in its traceback. This happens after cleanup_traceback(), so isn't cleaned, causing cleanup_gc() fail for all the further tests in the same test run. Avoid this, by dropping list just before checking if any object is leaked.
This commit is contained in:
parent
b88fa39894
commit
5bc0baeafa
@ -409,6 +409,8 @@ class QubesTestCase(unittest.TestCase):
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# do not keep leaked object references in locals()
|
||||
leaked = bool(leaked)
|
||||
assert not leaked
|
||||
|
||||
def cleanup_loop(self):
|
||||
|
Loading…
Reference in New Issue
Block a user