pytest-benchmark
pytest-benchmark copied to clipboard
Having a setup function and >1 iterations is not possible
As coded in src/pytest_benchmark/fixture.py:
if iterations > 1 and setup:
raise ValueError("Can't use more than 1 `iterations` with a `setup` function.")
I have not found any reference to this in documentation. Moreover, the initial pedantic example in documentation suggests using a setup function and 10 iterations, which is impossible.
I second this request, to allow multiple benchmark(...) lines per test case. Multiple calls should be summed/added.