MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testLazyAttributes

Method testLazyAttributes

tests/Workflow.py:88–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

86 )
87
88 def testLazyAttributes(self):
89 workflow = self.g.withLazy(True).get_repo("PyGithub/PyGithub").get_workflow("check.yml")
90 self.assertEqual(
91 str(workflow), 'Workflow(url="/repos/PyGithub/PyGithub/actions/workflows/check.yml", name=None)'
92 )
93 self.assertEqual(workflow.url, "/repos/PyGithub/PyGithub/actions/workflows/check.yml")
94
95 workflow = self.g.withLazy(True).get_repo("PyGithub/PyGithub").get_workflow(42)
96 self.assertEqual(str(workflow), 'Workflow(url="/repos/PyGithub/PyGithub/actions/workflows/42", name=None)')
97 self.assertEqual(workflow.id, 42)
98 self.assertEqual(workflow.url, "/repos/PyGithub/PyGithub/actions/workflows/42")
99
100 def testGetRunsWithNoArguments(self):
101 self.assertListKeyEqual(

Callers

nothing calls this directly

Calls 3

get_workflowMethod · 0.80
get_repoMethod · 0.45
withLazyMethod · 0.45

Tested by

no test coverage detected