Open mweinelt opened 2 years ago
After upgrading pytest>=7.0 the setup of the following test started failing.
____________________ ERROR at setup of test_incorrect_login ____________________ cls = <class '_pytest.runner.CallInfo'> func = <function call_runtest_hook.<locals>.<lambda> at 0x7ffff5301af0> when = 'setup' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /nix/store/6c9iqs6x50545pd3sg6qjbv01h8lwzaw-python3.9-pytest-7.0.1/lib/python3.9/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /nix/store/6c9iqs6x50545pd3sg6qjbv01h8lwzaw-python3.9-pytest-7.0.1/lib/python3.9/site-packages/_pytest/runner.py:261: in <lambda> lambda: ihook(item=item, **kwds), when=when, reraise=reraise /nix/store/iwbyv0fk6sx0ihshpf0pw1ligp1qmdwg-python3.9-pluggy-1.0.0/lib/python3.9/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /nix/store/iwbyv0fk6sx0ihshpf0pw1ligp1qmdwg-python3.9-pluggy-1.0.0/lib/python3.9/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /nix/store/6c9iqs6x50545pd3sg6qjbv01h8lwzaw-python3.9-pytest-7.0.1/lib/python3.9/site-packages/_pytest/skipping.py:236: in pytest_runtest_setup skipped = evaluate_skip_marks(item) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <Function test_incorrect_login> def evaluate_skip_marks(item: Item) -> Optional[Skip]: """Evaluate skip and skipif marks on item, returning Skip if triggered.""" for mark in item.iter_markers(name="skipif"): if "condition" not in mark.kwargs: conditions = mark.args else: conditions = (mark.kwargs["condition"],) # Unconditional. if not conditions: reason = mark.kwargs.get("reason", "") return Skip(reason) # If any of the conditions are true. for condition in conditions: result, reason = evaluate_condition(item, mark, condition) if result: return Skip(reason) for mark in item.iter_markers(name="skip"): try: return Skip(*mark.args, **mark.kwargs) except TypeError as e: > raise TypeError(str(e) + " - maybe you meant pytest.mark.skipif?") from None E TypeError: __init__() got multiple values for argument 'reason' - maybe you meant pytest.mark.skipif? /nix/store/6c9iqs6x50545pd3sg6qjbv01h8lwzaw-python3.9-pytest-7.0.1/lib/python3.9/site-packages/_pytest/skipping.py:190: TypeError
After upgrading pytest>=7.0 the setup of the following test started failing.