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