示例#1
0
 def test_greedy_some5(self):
     _ = DummyVar('_')
     y = LogicVar('y')
     assert_raises(
         NoSolution, eval,
         begin(set_text('aaa'), greedy_some(char(_), _, y), char(_), eoi,
               y))
示例#2
0
 def test_greedy_some4(self):
     _ = DummyVar('_')
     y = LogicVar('y')
     eq_(
         eval(
             begin(set_text('aaa'), greedy_some(char(_), _, y), eoi,
                   getvalue(y))), ['a', 'a', 'a'])
示例#3
0
文件: testparser.py 项目: chaosim/dao
 def test_greedy_some5(self):
   _ = DummyVar('_')
   y = LogicVar('y')
   assert_raises(NoSolution, eval,
                 begin(set_text('aaa'), greedy_some(char(_), _, y), char(_), eoi, y))
示例#4
0
文件: testparser.py 项目: chaosim/dao
 def test_greedy_some4(self):
   _ = DummyVar('_')
   y = LogicVar('y')
   eq_(eval(begin(set_text('aaa'), greedy_some(char(_), _, y), eoi, getvalue(y))), ['a', 'a', 'a'])
示例#5
0
文件: testparser.py 项目: chaosim/dao
 def test_greedy_some3(self):
   assert_raises(NoSolution, eval, 
                 begin(set_text('aaa'), greedy_some(char('a')), char('a'), eoi))
示例#6
0
文件: testparser.py 项目: chaosim/dao
 def test_greedy_some2(self):
   eq_(eval(begin(set_text('aaa'), greedy_some(char('a')), eoi)), True)
示例#7
0
 def test_greedy_some3(self):
     assert_raises(
         NoSolution, eval,
         begin(set_text('aaa'), greedy_some(char('a')), char('a'), eoi))
示例#8
0
 def test_greedy_some2(self):
     eq_(eval(begin(set_text('aaa'), greedy_some(char('a')), eoi)), True)