tests: clear PCIDevice cache after each test

This is yet another place where references to VM objects contribute to
object leaks.
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-16 21:32:15 +01:00
parent d2a7cbb83e
commit c17b634913
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -60,6 +60,7 @@ import qubes.config
import qubes.devices
import qubes.events
import qubes.exc
import qubes.ext.pci
import qubes.vm.standalonevm
import qubes.vm.templatevm
@ -378,6 +379,7 @@ class QubesTestCase(unittest.TestCase):
self.loop = asyncio.get_event_loop()
self.addCleanup(self.cleanup_loop)
self.addCleanup(qubes.ext.pci._cache_get.cache_clear)
def cleanup_gc(self):
gc.collect()