예제 #1
0
 def test_get_author_many_commits(self, mocked_gql: Any) -> None:
     """ Tests that authors for all commits can be fetched
     """
     pr = GitHubPR("pytorch", "pytorch", 76118)
     authors = pr.get_authors()
     self.assertGreater(pr.get_commit_count(), 100)
     self.assertGreater(len(authors), 50)
     self.assertTrue("@" in pr.get_author())
예제 #2
0
 def test_gql_complexity(self, mocked_gql: Any) -> None:
     "Fetch comments and conclusions for PR with 60 commits"
     # Previous version of GrapQL query used to cause HTTP/502 error
     # see https://gist.github.com/malfet/9b93bc7eeddeaf1d84546efc4f0c577f
     pr = GitHubPR("pytorch", "pytorch", 68111)
     self.assertGreater(len(pr.get_comments()), 20)
     self.assertGreater(len(pr.get_checkrun_conclusions()), 3)
     self.assertGreater(pr.get_commit_count(), 60)