def test_price_string_with_decimal_restriction_does_not_find_invalid_prices(price): price_string_validator = re.compile(price_string(False, True)['pattern']) assert re.search(price_string_validator, price) is None
def test_price_string_empty(): price_string_validator = re.compile(price_string(True)['pattern']) m = re.search(price_string_validator, '') assert m is not None
def test_price_string_finds_valid_prices(price): price_string_validator = re.compile(price_string(False)['pattern']) assert re.search(price_string_validator, price) is not None