Return a MarkDecorator with extra arguments added. Unlike calling the MarkDecorator, with_args() can be used even if the sole argument is a callable/class.
(self, *args: object, **kwargs: object)
| 382 | return self.name # for backward-compat (2.4.1 had this attr) |
| 383 | |
| 384 | def with_args(self, *args: object, **kwargs: object) -> MarkDecorator: |
| 385 | """Return a MarkDecorator with extra arguments added. |
| 386 | |
| 387 | Unlike calling the MarkDecorator, with_args() can be used even |
| 388 | if the sole argument is a callable/class. |
| 389 | """ |
| 390 | mark = Mark(self.name, args, kwargs, _ispytest=True) |
| 391 | return MarkDecorator(self.mark.combined_with(mark), _ispytest=True) |
| 392 | |
| 393 | # Type ignored because the overloads overlap with an incompatible |
| 394 | # return type. Not much we can do about that. Thankfully mypy picks |