Don't readd capturelog handler after log tests.
I don't really know why, but doing that ends up with something calling sys.stdout.close()... Fixes #856.
This commit is contained in:
parent
aa1ea9b063
commit
8aab87e2a2
@ -27,6 +27,7 @@ import itertools
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import pytest_capturelog
|
||||||
|
|
||||||
from qutebrowser.utils import log
|
from qutebrowser.utils import log
|
||||||
|
|
||||||
@ -64,6 +65,8 @@ def restore_loggers():
|
|||||||
h.close()
|
h.close()
|
||||||
root_logger.setLevel(original_logging_level)
|
root_logger.setLevel(original_logging_level)
|
||||||
for h in root_handlers:
|
for h in root_handlers:
|
||||||
|
if not isinstance(h, pytest_capturelog.CaptureLogHandler):
|
||||||
|
# https://github.com/The-Compiler/qutebrowser/issues/856
|
||||||
root_logger.addHandler(h)
|
root_logger.addHandler(h)
|
||||||
logging._acquireLock()
|
logging._acquireLock()
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user