Hi pytest-experts :)
i like to use the caplog fixture in another fixture with session scope:
import pytest
import logging
@pytest.fixture(scope='session')
def my_log(caplog):
caplog.set_level(logging.INFO)
def test_foo(my_log):
pass
This results in the following error:
ScopeMismatch: You tried to access the 'function' scoped fixture 'caplog' with a 'session' scoped request object, involved factories
Hi pytest-experts :)
i like to use the caplog fixture in another fixture with session scope:
This results in the following error:
ScopeMismatch: You tried to access the 'function' scoped fixture 'caplog' with a 'session' scoped request object, involved factories