Better pytest atexit logging error workaround
This commit is contained in:
parent
eb2627721e
commit
fec312ed09
1 changed files with 2 additions and 1 deletions
|
@ -411,6 +411,7 @@ def crypt_bitcoin_lib(request, monkeypatch):
|
|||
return CryptBitcoin
|
||||
|
||||
# Workaround for pytest>=0.4.1 bug when logging in atexit handlers (I/O operation on closed file)
|
||||
@atexit.register
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def disableLog():
|
||||
yield None # Wait until all test done
|
||||
logging.getLogger('').setLevel(logging.getLevelName(logging.CRITICAL))
|
||||
|
|
Loading…
Reference in a new issue