def test_parse_some(self): self.assertParse( combinators.sep_by(primitives.error({"error!"}), primitives.match(lambda c: c == "h")), ["h"], "ello", "hello")
def test_parses_none_2(self): self.assertParse( combinators.sep_by(primitives.match(lambda c: c == ","), primitives.error({"error!"})), [], "hello", "hello")
def test_parses_none(self): self.assertParse( combinators.sep_by(primitives.match(lambda c: c == ","), primitives.match(lambda c: c == "h")), [], "ello", "ello")