| 25 | mark() # type: ignore[operator] |
| 26 | |
| 27 | def test_mark_with_param(self): |
| 28 | def some_function(abc): |
| 29 | pass |
| 30 | |
| 31 | class SomeClass: |
| 32 | pass |
| 33 | |
| 34 | assert pytest.mark.foo(some_function) is some_function |
| 35 | marked_with_args = pytest.mark.foo.with_args(some_function) |
| 36 | assert marked_with_args is not some_function # type: ignore[comparison-overlap] |
| 37 | |
| 38 | assert pytest.mark.foo(SomeClass) is SomeClass |
| 39 | assert pytest.mark.foo.with_args(SomeClass) is not SomeClass # type: ignore[comparison-overlap] |
| 40 | |
| 41 | def test_pytest_mark_name_starts_with_underscore(self) -> None: |
| 42 | mark = MarkGenerator(_ispytest=True) |