I am using pytest v5.4.3 and I receive the following error when executing test cases:
File "D:\.venv\lib\site-packages\_pytest\config\argparsing.py", line 177, in addini
assert type in (None, "pathlist", "args", "linelist", "bool")
AssertionError: type: string
In pytest v5.4.3 the string type is not yet added to the assertion, thus the error.
A bit more detail:
The pytest-asyncio plugin calls the addini method like this:
parser.addini(
"asyncio_mode",
help="default value for --asyncio-mode",
type="string", # <----- Problem
default="legacy",
)
whereas the addini method (in _pytest/config/argparsing.py) looks like this (in v5.4.3):
def addini(
self,
name: str,
help: str,
type: Optional["Literal['pathlist', 'args', 'linelist', 'bool']"] = None,
default=None,
) -> None:
assert type in (None, "pathlist", "args", "linelist", "bool")
...
So, I think the minimum version of pytest should be adjusted
I am using
pytestv5.4.3 and I receive the following error when executing test cases:In pytest v5.4.3 the
stringtype is not yet added to the assertion, thus the error.A bit more detail:
The
pytest-asyncioplugincalls theaddinimethod like this:whereas the
addinimethod (in_pytest/config/argparsing.py) looks like this (in v5.4.3):So, I think the minimum version of
pytestshould be adjusted