コード例 #1
0
ファイル: test_combinators.py プロジェクト: rfw/kessel
 def test_parses_star(self):
     self.assertParse(combinators.mapf_star(primitives.unit(lambda: [1, 2]))
                                           (lambda x, y: x + y),
                      3, "test", "test")
コード例 #2
0
ファイル: test_primitives.py プロジェクト: rfw/kessel
 def test_parses(self):
     self.assertParse(primitives.unit(lambda: 1), 1, "hello", "hello")
コード例 #3
0
ファイル: test_combinators.py プロジェクト: rfw/kessel
 def test_parses(self):
     self.assertParse(combinators.mapf(primitives.unit(lambda: 1))
                                      (lambda x: x),
                      1, "test", "test")