pytest-benchmark icon indicating copy to clipboard operation
pytest-benchmark copied to clipboard

Having a setup function and >1 iterations is not possible

Open romanrdgz opened this issue 8 years ago • 1 comments

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.

romanrdgz avatar Sep 26 '16 11:09 romanrdgz

I second this request, to allow multiple benchmark(...) lines per test case. Multiple calls should be summed/added.

arekbulski avatar Jan 17 '18 10:01 arekbulski