There used to be code which help a reference open to the backend database. Parts of this are RAII so destruction makes it impossible to work further with the database.
Probably, this was broken by my refactors. Restore!
See @hashar comments on https://gerrit.wikimedia.org/r/#/c/integration/quibble/+/545309/ :
Broken since a663ad60cdffee3a19bee43c5b4a0bd0bd60f25a / https://gerrit.wikimedia.org/r/#/c/integration/quibble/+/513520/
That breaks notably --dump-db-postrun
INFO:quibble.cmd:<<< Finish: Run tests in mediawiki/core: , in 0.107 s INFO:backend.MySQL:Dumping database to /home/hashar/workspace/log/mysqldump.sql Exception ignored in: <function MySQL.__del__ at 0x7fd20f528598> Traceback (most recent call last): File "/home/hashar/projects/integration/quibble/quibble/backend.py", line 294, in __del__ File "/home/hashar/projects/integration/quibble/quibble/backend.py", line 137, in stop File "/home/hashar/projects/integration/quibble/quibble/backend.py", line 278, in dump NameError: name 'open' is not defined
With python 3.7