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