MCPcopy
hub / github.com/idank/explainshell / assertMatchSingle

Method assertMatchSingle

tests/test_matcher.py:14–19  ·  view source on GitHub ↗
(self, what, expectedmanpage, expectedresults)

Source from the content-addressed store, hash-verified

12
13class test_matcher(unittest.TestCase):
14 def assertMatchSingle(self, what, expectedmanpage, expectedresults):
15 m = matcher.Matcher(what, s)
16 groups = m.match()
17 self.assertEqual(len(groups), 2)
18 self.assertEqual(groups[1].manpage, expectedmanpage)
19 self.assertEqual(groups[1].results, expectedresults)
20
21 def test_unknown_prog(self):
22 self.assertRaises(errors.ProgramDoesNotExist, matcher.Matcher("foo", s).match)

Calls 1

matchMethod · 0.95

Tested by

no test coverage detected