5.3.3 breaks `lazy_fixture` pattern
See original GitHub issueFirst of all thanks a lot for the creation of pytest and all the work that is going into it!
This is the problem I have observed:
pytest-5.3.3
breaks usage of lazy_fixture
parametrisation that was working with pytest-5.3.2
pytest: 5.3.3 (conda-forge) pytest-lazy-fixture: 0.6.2 os: macos catalina python: 3.6.7
import pytest
from pytest_lazyfixture import lazy_fixture
@pytest.fixture
def foo():
return "foo"
@pytest.fixture
def bar():
return "bar"
@pytest.fixture(params=[
lazy_fixture("foo"),
lazy_fixture("bar")
])
def myfixture(request):
return request.param
def test_foo_bar(myfixture):
assert myfixture in ["foo", "bar"]
This fails with the following error
@pytest.fixture(params=[
lazy_fixture("foo"),
lazy_fixture("bar")
])
def myfixture(request):
E recursive dependency involving fixture 'foo' detected
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
pytest Documentation - Read the Docs
The “factory as fixture” pattern can help in situations where the result of a fixture ... break pytest's internals. ... pytest-lazy-fixture.
Read more >FreeBSD - DistroWatch.com
FreeBSD is a UNIX-like operating system for the i386, amd64, IA-64, arm, MIPS, powerpc, ppc64, PC-98 and UltraSPARC platforms based on U.C. Berkeley's ......
Read more >Debian -- Source Packages in "sid", Subsection misc
... haskell-lambdabot-haskell-plugins (5.3-3); haskell-lambdabot-irc-plugins ... libregexp-pattern-defhash-perl (0.001-3); libregexp-pattern-license-perl ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@blueyed thanks for the CC. I’ve never used
lazy_fixture
before, so I’ll have to dig into it a bit, but this issue is separate from the one found in https://github.com/pytest-dev/pytest/issues/6492Another idea is to list all issues in #6492 itself for book keeping (I mean in the first post, in a separate section).