mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Avoid logging increase during tests (#84672)
This commit is contained in:
@@ -74,9 +74,6 @@ from tests.components.recorder.common import ( # noqa: E402, isort:skip
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO)
|
||||
|
||||
asyncio.set_event_loop_policy(runner.HassEventLoopPolicy(False))
|
||||
# Disable fixtures overriding our beautiful policy
|
||||
asyncio.set_event_loop_policy = lambda policy: None
|
||||
@@ -92,6 +89,11 @@ def pytest_configure(config):
|
||||
config.addinivalue_line(
|
||||
"markers", "no_fail_on_log_exception: mark test to not fail on logged exception"
|
||||
)
|
||||
if config.getoption("verbose"):
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
else:
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logging.getLogger("sqlalchemy.engine").setLevel(logging.INFO)
|
||||
|
||||
|
||||
def pytest_runtest_setup():
|
||||
|
Reference in New Issue
Block a user