Commit fafe0b76 by Arun Babu Neelicattu

tests: use simple log formatting

parent 896b5805
from __future__ import annotations
import logging
import os
import re
import shutil
......@@ -402,3 +403,14 @@ def project_factory(
@pytest.fixture
def project_root() -> Path:
return Path(__file__).parent.parent
@pytest.fixture(autouse=True)
def set_simple_log_formatter() -> None:
"""
This fixture removes any formatting added via IOFormatter.
"""
for name in logging.Logger.manager.loggerDict:
for handler in logging.getLogger(name).handlers:
# replace formatter with simple formatter for testing
handler.setFormatter(logging.Formatter(fmt="%(message)s"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment