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

Method testStatisticsContributors

tests/Repository.py:2088–2106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2086 self.repo.unsubscribe_from_hub("push", "http://requestb.in/1bc1sc61")
2087
2088 def testStatisticsContributors(self):
2089 with mock.patch("github.Requester.Consts.PROCESSING_202_WAIT_TIME", 0):
2090 stats = self.repo.get_stats_contributors()
2091 seenJacquev6 = False
2092 for s in stats:
2093 adTotal = 0
2094 total = 0
2095 for w in s.weeks:
2096 total += w.c
2097 adTotal += w.a + w.d
2098 self.assertEqual(total, s.total)
2099 if s.author.login == "jacquev6":
2100 seenJacquev6 = True
2101 self.assertEqual(adTotal, 282147)
2102 self.assertEqual(
2103 s.weeks[0].w,
2104 datetime(2012, 2, 12, tzinfo=timezone.utc),
2105 )
2106 self.assertTrue(seenJacquev6)
2107
2108 def testStatisticsCommitActivity(self):
2109 with mock.patch("github.Requester.Consts.PROCESSING_202_WAIT_TIME", 0):

Callers

nothing calls this directly

Calls 2

patchMethod · 0.80

Tested by

no test coverage detected