You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`pytest_generate_tests` doesn't work to expose fixtures to pytest-bdd
Hence this dirty workaround. `pytest_generate_tests` sets the global
`the_baseline` that is returned then by this fixture...
~> pytest-dev/pytest-bdd#620
@given("test generated fixture")
def test_generated_fixture(normal_fixture, generated_fixture):
print(fixture)
print(generated_fixture)
return 1
@pytest.fixture
def normal_fixture():
return 1
defined pytest_generated_tests in conftest.py
def pytest_generate_tests(metafunc):
if "generated_fixture" in metafunc.fixturenames:
metafunc.parametrize("generated_fixture", [1, 2, 3])
will result in error
E fixture 'generated_fixture' not found
The text was updated successfully, but these errors were encountered: