MCPcopy
hub / github.com/pytest-dev/pytest / test_mark_with_param

Method test_mark_with_param

testing/test_mark.py:28–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

with_argsMethod · 0.80
fooMethod · 0.45

Tested by

no test coverage detected