Example #1
0
 def test_nomatch(self):
     with pytest.raises(parsec.ParseError):
         helpers.decimal().parse('-4')
Example #2
0
 def test_partial(self):
     assert helpers.decimal().parse('10.05x') == 10.05
Example #3
0
 def test_match_negative(self):
     assert helpers.decimal().parse('-5.36') == -5.36
Example #4
0
 def test_match_negative_zero(self):
     assert helpers.decimal().parse('-0.705') == -0.705
Example #5
0
 def test_match_positive(self):
     assert helpers.decimal().parse('4.25') == 4.25