File size: 327 Bytes
cdb73a8
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# tests/conftest.py
import logging

import pytest


@pytest.fixture(autouse=True)
def caplog_for_tests(caplog):
    """
    Fixture to capture logs during tests and set a default logging level.
    This prevents log messages from cluttering test output unless a test fails.
    """
    caplog.set_level(logging.INFO)
    yield