I haven't had time to investigate why, but it seems that the pytest 5.3.3 release broke pytest-lazy-fixture:
Running the basic example from the README
import pytest
@pytest.fixture(params=[1, 2])
def one(request):
return request.param
@pytest.mark.parametrize('arg1,arg2', [
('val1', pytest.lazy_fixture('one')),
])
def test_func(arg1, arg2):
assert arg2 in [1, 2]
results in the following error:
$ pytest test_lazy_fixture.py
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-5.3.3, py-1.7.0, pluggy-0.12.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/yannick/.hypothesis/examples')
rootdir: /home/yannick
plugins: xonsh-0.9.6, lazy-fixture-0.6.2, hypothesis-4.34.0
collected 2 items
test_lazy_fixture.py EE [100%]
==================================== ERRORS ====================================
__________________ ERROR at setup of test_func[val1-arg20-1] ___________________
file /home/yannick/test_lazy_fixture.py, line 7
@pytest.mark.parametrize('arg1,arg2', [
('val1', pytest.lazy_fixture('one')),
])
def test_func(arg1, arg2):
file /home/yannick/test_lazy_fixture.py, line 3
@pytest.fixture(params=[1, 2])
def one(request):
file /home/yannick/.local/lib/python3.6/site-packages/_pytest/fixtures.py, line 297
def get_direct_param_fixture_func(request):
E recursive dependency involving fixture 'one' detected
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, one, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/home/yannick/.local/lib/python3.6/site-packages/_pytest/fixtures.py:297
__________________ ERROR at setup of test_func[val1-arg20-2] ___________________
file /home/yannick/test_lazy_fixture.py, line 7
@pytest.mark.parametrize('arg1,arg2', [
('val1', pytest.lazy_fixture('one')),
])
def test_func(arg1, arg2):
file /home/yannick/test_lazy_fixture.py, line 3
@pytest.fixture(params=[1, 2])
def one(request):
file /home/yannick/.local/lib/python3.6/site-packages/_pytest/fixtures.py, line 297
def get_direct_param_fixture_func(request):
E recursive dependency involving fixture 'one' detected
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, one, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/home/yannick/.local/lib/python3.6/site-packages/_pytest/fixtures.py:297
============================== 2 errors in 0.02s ===============================
If I have time, I'll have a closer look and report back on my findings.