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

Method test_collect_result

testing/test_runner.py:436–456  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

434
435class TestSessionReports:
436 def test_collect_result(self, pytester: Pytester) -> None:
437 col = pytester.getmodulecol(
438 """
439 def test_func1():
440 pass
441 class TestClass(object):
442 pass
443 """
444 )
445 rep = runner.collect_one_node(col)
446 assert not rep.failed
447 assert not rep.skipped
448 assert rep.passed
449 locinfo = rep.location
450 assert locinfo[0] == col.path.name
451 assert not locinfo[1]
452 assert locinfo[2] == col.path.name
453 res = rep.result
454 assert len(res) == 2
455 assert res[0].name == "test_func1"
456 assert res[1].name == "TestClass"
457
458
459reporttypes: List[Type[reports.BaseReport]] = [

Callers

nothing calls this directly

Calls 1

getmodulecolMethod · 0.45

Tested by

no test coverage detected