Log test case start and end

This commit is contained in:
shortcutme 2019-11-27 03:03:31 +01:00
parent 777486a5be
commit 1b2eee058c
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 5 additions and 1 deletions

View File

@ -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)