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

Method test_check_collect_hashes

testing/test_collection.py:726–743  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

724
725class Test_genitems:
726 def test_check_collect_hashes(self, pytester: Pytester) -> None:
727 p = pytester.makepyfile(
728 """
729 def test_1():
730 pass
731
732 def test_2():
733 pass
734 """
735 )
736 shutil.copy(p, p.parent / (p.stem + "2" + ".py"))
737 items, _reprec = pytester.inline_genitems(p.parent)
738 assert len(items) == 4
739 for numi, i in enumerate(items):
740 for numj, j in enumerate(items):
741 if numj != numi:
742 assert hash(i) != hash(j)
743 assert i != j
744
745 def test_example_items1(self, pytester: Pytester) -> None:
746 p = pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

copyMethod · 0.80
makepyfileMethod · 0.45
inline_genitemsMethod · 0.45

Tested by

no test coverage detected