Exemplo n.º 1
0
 def test_greedy_seplist5(self):
     _ = DummyVar('_')
     y = LogicVar('y')
     assert_raises(
         NoSolution, eval,
         begin(set_text('a,a,a'), greedy_seplist(char(_), char(','), _, y),
               char(_), eoi, getvalue(y)))
Exemplo n.º 2
0
 def test_greedy_seplist4(self):
     _ = DummyVar('_')
     y = LogicVar('y')
     eq_(
         eval(
             begin(set_text('a,a,a'),
                   greedy_seplist(char(_), char(','), _, y), eoi,
                   getvalue(y))), ['a', 'a', 'a'])
Exemplo n.º 3
0
 def test_greedy_seplist5(self):
   _ = DummyVar('_')
   y = LogicVar('y')
   assert_raises(NoSolution, eval,
                 begin(set_text('a,a,a'), greedy_seplist(char(_), char(','), _, y), char(_), eoi, getvalue(y)))
Exemplo n.º 4
0
 def test_greedy_seplist4(self):
   _ = DummyVar('_')
   y = LogicVar('y')
   eq_(eval(begin(set_text('a,a,a'), greedy_seplist(char(_), char(','), _, y), eoi, getvalue(y))), ['a', 'a', 'a'])
Exemplo n.º 5
0
 def test_greedy_seplist3(self):
   assert_raises(NoSolution, eval, 
                 begin(set_text('a,a,a'), greedy_seplist(char('a'), char(',')), char('a'), eoi))
Exemplo n.º 6
0
 def test_greedy_seplist2(self):
   eq_(eval(begin(set_text('a,a,a'), greedy_seplist(char('a'), char(',')), eoi)), True)
Exemplo n.º 7
0
 def test_greedy_seplist3(self):
     assert_raises(
         NoSolution, eval,
         begin(set_text('a,a,a'), greedy_seplist(char('a'), char(',')),
               char('a'), eoi))
Exemplo n.º 8
0
 def test_greedy_seplist2(self):
     eq_(
         eval(
             begin(set_text('a,a,a'), greedy_seplist(char('a'), char(',')),
                   eoi)), True)