MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_mark_with_param

Method test_mark_with_param

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

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

with_argsMethod · 0.80
fooMethod · 0.45

Tested by

no test coverage detected