def test_int_converter_invalid_config(num_digits): with pytest.raises(ValueError): converters.IntConverter(num_digits)
def test_int_converter_malformed(fragment): c = converters.IntConverter() assert c.convert(fragment) is None
def test_int_converter(fragment, num_digits, min, max, expected): c = converters.IntConverter(num_digits, min, max) assert c.convert(fragment) == expected
def test_int_converter_malformed(value): c = converters.IntConverter() assert c.convert(value) is None
def test_int_converter(value, num_digits, min, max, expected): c = converters.IntConverter(num_digits, min, max) assert c.convert(value) == expected
def test_int_filter_malformed(segment): c = converters.IntConverter() assert c.convert(segment) is None