Skip to content

Commit ce2e0ab

Browse files
committed
configuri
1 parent 174b75d commit ce2e0ab

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

template/tests/unit/conftest.py.jinja

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ import pytest
77
from .vcrpy_fixtures import pytest_recording_configure # noqa: F401 # this is configuration we need in conftest scope
88
from .vcrpy_fixtures import vcr_config # noqa: F401 # this is an autouse fixture{% endraw %}{% endif %}{% raw %}
99

10-
logger = logging.getLogger(__name__){% endraw %}
10+
logger = logging.getLogger(__name__)
11+
12+
def pytest_configure(
13+
config: pytest.Config, # noqa: ARG001 # the config argument MUST be present (even when unused) or pytest throws an error
14+
):
15+
# force the vcr.cassette logger to WARNING+ because otherwise the logs get super noisy with the playback of all the cassettes
16+
vcr_logger = logging.getLogger("vcr.cassette")
17+
vcr_logger.setLevel(logging.WARNING){% endraw %}

0 commit comments

Comments
 (0)