Tear down module logger handler in system tests

The module-level logger has a handler that writes into a temporary
directory. Ensure the logging output is flushed and the handler is
closed before attempting to remove this temporary directory.
This commit is contained in:
Tom Krizek 2023-05-09 14:20:02 +02:00
parent 1aaefc9cf4
commit 0f8a2b07a4
No known key found for this signature in database
GPG key ID: 01623B9B652A20A7

View file

@ -449,6 +449,8 @@ else:
)
else:
mlogger.debug("deleting temporary directory")
handler.flush()
handler.close()
shutil.rmtree(testdir)
def _run_script( # pylint: disable=too-many-arguments