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
This commit is contained in:
parent
c56cd4abc0
commit
b510d2d4d0
1
tox.ini
1
tox.ini
@ -11,6 +11,7 @@ setenv =
|
|||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PYTHONDONTWRITEBYTECODE = 1
|
PYTHONDONTWRITEBYTECODE = 1
|
||||||
OS_TEST_PATH=./ironic_python_agent/tests/unit
|
OS_TEST_PATH=./ironic_python_agent/tests/unit
|
||||||
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||||
LANGUAGE=en_US
|
LANGUAGE=en_US
|
||||||
LC_ALL=en_US.utf-8
|
LC_ALL=en_US.utf-8
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user