MCPcopy
hub / github.com/kubernetes/test-infra / test_xrefs

Method test_xrefs

gubernator/github/classifier_test.py:209–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

207 ('needs review', 2, 3))
208
209 def test_xrefs(self):
210 def expect(body, comments, result):
211 self.assertEqual(result, classifier.get_xrefs(
212 [{'comment': c} for c in comments], {'body': body}))
213 def fail(path):
214 return 'foobar https://gubernator.k8s.io/build%s asdf' % path
215 expect(None, [], [])
216 expect('something', [], [])
217 expect(fail('/a/b/34/'), [], ['/a/b/34'])
218 expect(None, [fail('/a/b/34/')], ['/a/b/34'])
219 expect(fail('/a/b/34/'), [fail('/a/b/34]')], ['/a/b/34'])
220 expect(fail('/a/b/34/)'), [fail('/a/b/35]')], ['/a/b/34', '/a/b/35'])
221
222 def test_reviewers(self):
223 def expect(events, result):

Callers

nothing calls this directly

Calls 1

expectFunction · 0.50

Tested by

no test coverage detected