- 
                Notifications
    
You must be signed in to change notification settings  - Fork 167
 
Closed
Description
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
grillazz and rahulrajaram
Metadata
Metadata
Assignees
Labels
No labels