示例#1
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)
示例#2
0
 def test_comments_pagination(self, mocked_gql: Any) -> None:
     "Tests that PR with 50+ comments can be fetched"
     pr = GitHubPR("pytorch", "pytorch", 31093)
     self.assertGreater(len(pr.get_comments()), 50)