From: Rafael Zalamena Date: Fri, 28 Jul 2017 00:44:51 +0000 (-0300) Subject: topotests: add topology name to assert output X-Git-Tag: frr-7.1-dev~151^2~238 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5684f8100dc86d2d31264ec22637c21222437b22;p=mirror%2Ffrr.git topotests: add topology name to assert output Make it easy to identify which topology test we are running. --- diff --git a/tests/topotests/conftest.py b/tests/topotests/conftest.py index 43f9516a11..327e4625f2 100755 --- a/tests/topotests/conftest.py +++ b/tests/topotests/conftest.py @@ -53,14 +53,16 @@ def pytest_runtest_makereport(item, call): if call.excinfo is None: return + parent = item.parent + modname = parent.module.__name__ + # Treat skips as non errors if call.excinfo.typename != 'AssertionError': - logger.info('assert skipped at "{}": {}'.format( - item.name, call.excinfo.value)) + logger.info('assert skipped at "{}/{}": {}'.format( + modname, item.name, call.excinfo.value)) return # Handle assert failures - parent = item.parent parent._previousfailed = item - logger.error('assert failed at "{}": {}'.format( - item.name, call.excinfo.value)) + logger.error('assert failed at "{}/{}": {}'.format( + modname, item.name, call.excinfo.value))