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

Method test_function_equality

testing/python/collect.py:303–315  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

301 return pytest.Function.from_parent(parent=session, **kwargs)
302
303 def test_function_equality(self, pytester: Pytester) -> None:
304 def func1():
305 pass
306
307 def func2():
308 pass
309
310 f1 = self.make_function(pytester, name="name", callobj=func1)
311 assert f1 == f1
312 f2 = self.make_function(
313 pytester, name="name", callobj=func2, originalname="foobar"
314 )
315 assert f1 != f2
316
317 def test_repr_produces_actual_test_id(self, pytester: Pytester) -> None:
318 f = self.make_function(

Callers

nothing calls this directly

Calls 1

make_functionMethod · 0.95

Tested by

no test coverage detected