From b510d2d4d0fd5f157f3d660d876d5f89b0e3defd Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Wed, 28 Apr 2021 15:22:18 -0400 Subject: [PATCH] unit tests: Capture log output Debugging unit test failures is very challenging because all of the log output is mixed together. Capture the log messages and store them as part of the test, so that only log messages associated with failures are output, interleaved correctly with the results. This does not capture logs sent to stdout by _early_log(), although that would be a nice further improvement. Change-Id: I01e409ea73ff444e16caae0078e81585c703d5a5 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f5336da08..72f95b711 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 OS_TEST_PATH=./ironic_python_agent/tests/unit + OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} LANGUAGE=en_US LC_ALL=en_US.utf-8 deps =