Avoid logging increase during tests (#84672)
This commit is contained in:
parent
551d52103d
commit
cb982294bd
1 changed files with 5 additions and 3 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue