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

Method test_function_equality

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

Source from the content-addressed store, hash-verified

369 return pytest.Function.from_parent(parent=session, **kwargs)
370
371 def test_function_equality(self, pytester: Pytester) -> None:
372 def func1():
373 pass
374
375 def func2():
376 pass
377
378 f1 = self.make_function(pytester, name="name", callobj=func1)
379 assert f1 == f1
380 f2 = self.make_function(
381 pytester, name="name", callobj=func2, originalname="foobar"
382 )
383 assert f1 != f2
384
385 def test_repr_produces_actual_test_id(self, pytester: Pytester) -> None:
386 f = self.make_function(

Callers

nothing calls this directly

Calls 1

make_functionMethod · 0.95

Tested by

no test coverage detected