Closed avirshup closed 4 years ago
As a workaround, these two should work, though:
@pytest.mark.parametrize("data",
[lazy_fixture("foo"), lazy_fixture("bar")],
ids=["foo", "bar"])
@pytest.mark.parametrize("data",
[pytest.fixture(lazy_fixture("foo"), id="foo"),
pytest.fixture(lazy_fixture("bar"), id="bar")])
Actually, using pytest_make_parametrize_id
, this was easier to implement than expected. PR ready, see #47 :-)
That's fantastic - just checked out the branch and it works perfectly. Always nice to see a new feature that only needs 3 lines of code :) Thanks so much!
Finally shipped 0.6.3
version with this feature :)
First off, thank you for writing this plugin, it fixes problems that have been bugging me for years.
Given the following tests:
Pytest generates the following test names:
Would it be possible to use the fixture name to generate these ids? It would be great to end up with these names instead: