Incompatible with pytest lazy_fixture plugin
Hi all,
Probably similarly to #99 , incompatible with pytest lazy_fixture plugin
In conftest.py, I have the following:
@pytest.fixture
def print_one:
print('one')
@pytest.fixture
def print_two:
print('two')
@pytest.fixture(
params=[
lazy_fixture('print_one'),
lazy_fixture('print_two'),
]
)
def parametrize_prints():
pass
And consider the following failing test:
def test_foo(parametrize_prints):
assert False
Running pytest --reruns 1 -k test_foo -s prints out
oneRF
twoRF
Although the fixture are well identified by pytest in the prints test_file.py::test_foo[print_one]
The example here is trivial, but in my case, I want the system to run some tests at specific times and the tests always pass on re-run because lazy_fixture with freezegun is never executed. This makes the rerunfailures plugin actually unsuitable for us :-(
Can anyone have a look on this issue? I can also reproduce similar problem on my envrionment which causing rerun always fail.
@MRigal I have never used lazy_fixtures before. What would you expect in this case? That the fixture is generated a second time?
@sallner yes for sure! That it re-runs the same fixture
If you tell me where to dig, I could give it a look, but I have only little knowledge of the internals of pytest and the plugin environment