Stabilization of unittests

This commit is contained in:
Miroslav Štampar 2026-07-02 22:31:01 +02:00
parent 732d164538
commit 71d9c6d0f4
31 changed files with 200 additions and 58 deletions

View file

@ -18,7 +18,7 @@ import tempfile
import unittest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from _testutils import bootstrap, set_dbms
from _testutils import bootstrap, set_dbms, reset_dbms
bootstrap()
from lib.core.data import kb, conf
@ -173,3 +173,7 @@ class TestConfigFileParser(unittest.TestCase):
if __name__ == "__main__":
unittest.main()
def tearDownModule():
reset_dbms() # clear any DBMS forced via set_dbms() so it can't leak into later test modules