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

Method testDeleteOnMerge

tests/PullRequest.py:559–574  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

557 }
558
559 def testDeleteOnMerge(self):
560 self.assertTrue(self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref))
561 self.assertFalse(self.delete_restore_pull.is_merged())
562 status = self.delete_restore_pull.merge(delete_branch=True)
563 self.assertTrue(status.merged)
564 self.assertTrue(self.delete_restore_pull.is_merged())
565 with self.assertRaises(github.UnknownObjectException) as raisedexp:
566 self.delete_restore_repo.get_branch(self.delete_restore_pull.head.ref)
567 self.assertEqual(raisedexp.exception.message, "Branch not found")
568 self.assertEqual(
569 raisedexp.exception.data,
570 {
571 "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-branch",
572 "message": "Branch not found",
573 },
574 )
575
576 def testRestoreBranch(self):
577 with self.assertRaises(github.UnknownObjectException) as raisedexp:

Callers

nothing calls this directly

Calls 3

get_branchMethod · 0.80
is_mergedMethod · 0.80
mergeMethod · 0.45

Tested by

no test coverage detected