From ea5f64bfeafdcb6de39ab685cc943d9806043c38 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 4 Dec 2019 12:46:13 +0100 Subject: [PATCH] Only log at start of the test cases --- src/Test/conftest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Test/conftest.py b/src/Test/conftest.py index c703b77e..4ec4354d 100644 --- a/src/Test/conftest.py +++ b/src/Test/conftest.py @@ -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)) +