pytest-dev / pytest-repeat

pytest plugin for repeating test execution
https://pypi.python.org/pypi/pytest-repeat/
Other
169 stars 27 forks source link

--count only executing once #74

Closed dpinol closed 11 months ago

dpinol commented 11 months ago

Any idea why my test only executes once with --count=1000?

 pytest --count=1000  test/preprocessing/test_transforms.py 
====================================================================================== test session starts =======================================================================================
platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/dani/source/repos/sc-api
configfile: pyproject.toml
plugins: repeat-0.9.3
collected 1 item                                                                                                                                                                               

test/preprocessing/test_transforms.py::TestTransforms::test_AudioEncoder PASSED                                                                                                            [  100%]
======================================================================================= 11 passed in 0.52s =======================================================================================
RonnyPfannschmidt commented 11 months ago

With the provided information all we can do is a uninformed guess

I believe you are using unittest base classes

The unittest integration of pytest intentionally doesn't support parameterization

And the repeat plugin uses parameterization to do the repeating

dpinol commented 11 months ago

You're absolutely right! We're in the middle of the transition from unittest to pytest. thanks!