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

Method testUpdateCheckRunFailure

tests/CheckRun.py:253–295  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

251 self.assertEqual(check_run.output.annotations_count, 0)
252
253 def testUpdateCheckRunFailure(self):
254 # This is a different check run created for this test
255 check_run = self.testrepo.create_check_run(
256 name="fail_check_run",
257 head_sha="0283d46537193f1fed7d46859f15c5304b9836f9",
258 status="in_progress",
259 external_id="101",
260 started_at=datetime(2020, 10, 20, 10, 14, 51),
261 output={"title": "Check run for testing failure", "summary": ""},
262 )
263 self.assertEqual(check_run.name, "fail_check_run")
264 self.assertEqual(check_run.status, "in_progress")
265 check_run.edit(
266 status="completed",
267 conclusion="failure",
268 output={
269 "title": "Check run for testing failure",
270 "summary": "There is 1 whitespace error.",
271 "text": "You may have a whitespace error in the file 'test.py'",
272 "annotations": [
273 {
274 "path": "test.py",
275 "annotation_level": "failure",
276 "title": "whitespace checker",
277 "message": "Remove the unnecessary whitespace from the file.",
278 "start_line": 2,
279 "end_line": 2,
280 "start_column": 17,
281 "end_column": 18,
282 }
283 ],
284 },
285 actions=[
286 {
287 "label": "Fix",
288 "identifier": "fix_errors",
289 "description": "Allow us to fix these errors for you",
290 }
291 ],
292 )
293 self.assertEqual(check_run.status, "completed")
294 self.assertEqual(check_run.conclusion, "failure")
295 self.assertEqual(check_run.output.annotations_count, 1)
296
297 def testUpdateCheckRunAll(self):
298 check_run = self.testrepo.get_check_run(1279259090)

Callers

nothing calls this directly

Calls 2

create_check_runMethod · 0.80
editMethod · 0.45

Tested by

no test coverage detected