From 1b2eee058c090afcca6ff2aee6005a094cd925be Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 27 Nov 2019 03:03:31 +0100 Subject: [PATCH] Log test case start and end --- src/Test/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Test/conftest.py b/src/Test/conftest.py index ebf8cea5..17416709 100644 --- a/src/Test/conftest.py +++ b/src/Test/conftest.py @@ -444,5 +444,9 @@ def workaroundPytestLogError(): workaroundPytestLogError() + +@pytest.fixture(scope='function', autouse=True) +def logCaseStart(request): + logging.info("---- Start test case: %s ----" % request._pyfuncitem) yield None # Wait until all test done - logging.getLogger('').setLevel(logging.getLevelName(logging.CRITICAL)) + logging.info("---- End test case: %s ----" % request._pyfuncitem)