pytest: explicitly set system logger to DEBUG

We had a test grab the system logger via logging.getLogger() but when
running under pytest it isn't returned at the DEBUG level as it does in
nosetests.

This patch updates the test to set the level to DEBUG explicitly and
allows the only unit test that fails `pytest test/unit` to pass.

Change-Id: I1c93136cd13e927a2deb380a95fb9f96ec79fa30
This commit is contained in:
Matthew Oliver 2022-05-27 15:53:06 +10:00 committed by Clay Gerrard
parent 238dc03535
commit 19855db955

View File

@ -1548,6 +1548,7 @@ class TestUtils(unittest.TestCase):
self.handleError(record)
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = CrashyLogger()
logger.addHandler(handler)