-
-
Notifications
You must be signed in to change notification settings - Fork 362
Closed
Description
The parser annotation in plugin.py introduced in 10.0 does not work with pytest 6.
pytest-testinfra/testinfra/plugin.py
Line 40 in dc48cd9
def pytest_addoption(parser: pytest.Parser) -> None: |
pytest.Parser
is only available from pytest 7.0.0
>>> from testinfra import plugin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/testinfra/plugin.py", line 40, in <module>
def pytest_addoption(parser: pytest.Parser) -> None:
AttributeError: module 'pytest' has no attribute 'Parser'
While specifying minimal pytest version would be a solution, I would rather recommend finding another solution, as RHEL-9/Alma Linux 9/CentOS Stream 9 are running pytest 6 (and Python 3.9).
I'd be happy to help with finding a solution, should you decide to keep pytest 6 compatibility.
Metadata
Metadata
Assignees
Labels
No labels