Only log at start of the test cases

This commit is contained in:
shortcutme 2019-12-04 12:46:13 +01:00
parent 3dd04b27de
commit ea5f64bfea
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -413,6 +413,10 @@ def crypt_bitcoin_lib(request, monkeypatch):
CryptBitcoin.loadLib(request.param)
return CryptBitcoin
@pytest.fixture(scope='function', autouse=True)
def logCaseStart(request):
logging.debug("---- Start test case: %s ----" % request._pyfuncitem)
yield None # Wait until all test done
def workaroundPytestLogError():
@ -449,4 +453,5 @@ workaroundPytestLogError()
def logCaseStart(request):
logging.debug("---- Start test case: %s ----" % request._pyfuncitem)
yield None # Wait until all test done
logging.debug("---- End test case: %s ----" % request._pyfuncitem)
logging.getLogger('').setLevel(logging.getLevelName(logging.CRITICAL))