def test_schema(self): assert inputs.int_range(1, 5).__schema__ == { 'type': 'integer', 'minimum': 1, 'maximum': 5 }
def test_inclusive_range(self): int_range = inputs.int_range(1, 5) assert int_range(5) == 5
def test_higher(self): int_range = inputs.int_range(0, 5) with pytest.raises(ValueError): int_range(6)
def test_valid_range(self): int_range = inputs.int_range(1, 5) assert int_range(3) == 3