# Path: shpkpr/template_filters.py
# def filter_items(value, startswith=None, strip_prefix=False):
# def require_int(value, min=None, max=None):
# def require_float(value, min=None, max=None):
# def slugify(value, *args, **kwargs):
# class IntegerRequired(exceptions.ShpkprException):
# class IntegerTooSmall(exceptions.ShpkprException):
# class IntegerTooLarge(exceptions.ShpkprException):
# class FloatRequired(exceptions.ShpkprException):
# class FloatTooSmall(exceptions.ShpkprException):
# class FloatTooLarge(exceptions.ShpkprException):


import pytest
from shpkpr import template_filters
    i = template_filters.require_int("1", min=0, max=5)
    assert i == 1


def test_require_int_not_an_int():
    with pytest.raises(template_filters.IntegerRequired):
        template_filters.require_int("abc")


def test_require_int_too_low():
    with pytest.raises(template_filters.IntegerTooSmall):
        template_filters.require_int("-1", min=0)


def test_require_int_too_high():
    with pytest.raises(template_filters.IntegerTooLarge):
        template_filters.require_int("1", max=0)


def test_require_float():
    i = template_filters.require_float("1")
    assert i == 1


def test_require_float_in_range():
    i = template_filters.require_float("1", min=0, max=5)
    assert i == 1


def test_require_float_not_an_float():

# Path: shpkpr/template_filters.py
# def filter_items(value, startswith=None, strip_prefix=False):
# def require_int(value, min=None, max=None):
# def require_float(value, min=None, max=None):
# def slugify(value, *args, **kwargs):
# class IntegerRequired(exceptions.ShpkprException):
# class IntegerTooSmall(exceptions.ShpkprException):
# class IntegerTooLarge(exceptions.ShpkprException):
# class FloatRequired(exceptions.ShpkprException):
# class FloatTooSmall(exceptions.ShpkprException):
# class FloatTooLarge(exceptions.ShpkprException):


# Path: tests/test_template_filters.py
import pytest
from shpkpr import template_filters

    i = template_filters.require_int("1", min=0, max=5)
    assert i == 1


def test_require_int_not_an_int():
    with pytest.raises(template_filters.IntegerRequired):
        template_filters.require_int("abc")


def test_require_int_too_low():
    with pytest.raises(template_filters.IntegerTooSmall):
        template_filters.require_int("-1", min=0)


def test_require_int_too_high():
    with pytest.raises(template_filters.IntegerTooLarge):
        template_filters.require_int("1", max=0)


def test_require_float():
    i = template_filters.require_float("1")
    assert i == 1


def test_require_float_in_range():
    i = template_filters.require_float("1", min=0, max=5)
    assert i == 1


def test_require_float_not_an_float():

    with pytest.raises(template_filters.FloatRequired):