示例#1
0
 def test_cancelled_gets_ignored(self, mocked_gql: Any) -> None:
     """ Tests that cancelled workflow does not override existing successfull status
     """
     pr = GitHubPR("pytorch", "pytorch", 82169)
     conclusions = pr.get_checkrun_conclusions()
     self.assertTrue("Lint" in conclusions.keys())
     self.assertEqual(conclusions["Lint"][0], "SUCCESS")
示例#2
0
 def test_get_checkruns_many_runs(self, mocked_gql: Any) -> None:
     """ Tests that all checkruns can be fetched
     """
     pr = GitHubPR("pytorch", "pytorch", 77700)
     conclusions = pr.get_checkrun_conclusions()
     self.assertEqual(len(conclusions), 83)
     self.assertTrue("pull / linux-docs / build-docs (cpp)" in conclusions.keys())
示例#3
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)
示例#4
0
 def test_checksuites_pagination(self, mocked_gql: Any) -> None:
     "Tests that PR with lots of checksuits can be fetched"
     pr = GitHubPR("pytorch", "pytorch", 73811)
     self.assertGreater(len(pr.get_checkrun_conclusions()), 0)