invalid pytest minimum version in setup.cfg
Chedi opened this issue · 4 comments
Hi,
I'm trying to create an rpm for this project as it's a newly added dependency of molecule, and while running the tests I got this error:
/+ /usr/bin/python3 -m pytest --version
pytest 6.0.2
ERROR: usage: main.py [options] [file_or_dir] [file_or_dir] [...]
main.py: error: unrecognized arguments: --durations-min=3
I checked and it seems like the agument --duration-min was only added on version 6.1.0 of pytest (https://docs.pytest.org/en/stable/changelog.html#features), while in the setup.cfg the min version of pytest is 5.4.0
Line 73 in 4c38a99
a little addendum, the tests will not work with a pytest version < 6.1.0 as the type annotation has only been added on that version
pytest-dev/pytest@acc9310#diff-bad7b9b2d1db5b8a39a3afbf2e9d783f341a11b50b8081b91f01f66efb8891c7
the errors I get on version 6.0.2 (but not with 6.1.0)
========= test session starts =========
platform linux -- Python 3.9.0, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /mnt/56298eef-80c6-43f5-8aee-172b1d73d266/Projects/Fedora/python-subprocess-tee/subprocess-tee-0.1.5-test, configfile: setup.cfg
collected 2 items / 2 errors========= ERRORS =========
_________ ERROR collecting lib/subprocess_tee/test/test_unit.py _________
lib/subprocess_tee/test/test_unit.py:48: in
def test_run_echo(capsys: CaptureFixture[str]) -> None:
E TypeError: 'type' object is not subscriptable
_________ ERROR collecting lib/subprocess_tee/test/test_unit.py _________
lib/subprocess_tee/test/test_unit.py:48: in
def test_run_echo(capsys: CaptureFixture[str]) -> None:
E TypeError: 'type' object is not subscriptable
========= short test summary info =========
ERROR lib/subprocess_tee/test/test_unit.py - TypeError: 'type' object is not subscriptable
ERROR lib/subprocess_tee/test/test_unit.py - TypeError: 'type' object is not subscriptable
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========= 2 errors in 0.18s =========
Sure. The min test requirements are not well tested as pip always installs current versions. Feel free to raise a PR to bump the minimal pytest version needed for running tests.
For stuff like this we can even skip creating a bug.
Thanks.