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

Method testCustomPerPageIteration

tests/PaginatedList.py:348–363  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

346 self.assertEqual(len(self.repo.get_issues().get_page(2)), 100)
347
348 def testCustomPerPageIteration(self):
349 self.g.per_page = 3
350 repo = self.g.get_repo("PyGithub/PyGithub")
351 comments = repo.get_issue(1136).get_comments()
352 self.assertEqual(
353 [
354 datetime(2019, 8, 10, 18, 16, 46, tzinfo=timezone.utc),
355 datetime(2024, 1, 6, 16, 4, 34, tzinfo=timezone.utc),
356 datetime(2024, 1, 6, 17, 34, 11, tzinfo=timezone.utc),
357 datetime(2024, 3, 20, 15, 24, 15, tzinfo=timezone.utc),
358 datetime(2024, 3, 21, 10, 55, 14, tzinfo=timezone.utc),
359 datetime(2024, 3, 21, 14, 2, 22, tzinfo=timezone.utc),
360 datetime(2024, 3, 24, 13, 58, 57, tzinfo=timezone.utc),
361 ],
362 [comment.created_at for comment in comments],
363 )
364
365 def testCustomPerPageReversedIteration(self):
366 self.g.per_page = 3

Callers

nothing calls this directly

Calls 3

get_repoMethod · 0.45
get_commentsMethod · 0.45
get_issueMethod · 0.45

Tested by

no test coverage detected