testing: Add TEST_LOG_IGNORE_ERRORS envvar to suppress logging errors
This commit is contained in:
committed by
Rusty Russell
parent
d03cf820a8
commit
49049deb82
@@ -59,6 +59,9 @@ def setup_logging():
|
||||
if TEST_DEBUG:
|
||||
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
|
||||
|
||||
if env("TEST_LOG_IGNORE_ERRORS", "0") == "1":
|
||||
logging.raiseExceptions = False
|
||||
|
||||
yield
|
||||
|
||||
loggers = [logging.getLogger()] + list(logging.Logger.manager.loggerDict.values())
|
||||
|
||||
Reference in New Issue
Block a user