def test_floor_oor_lower(): with raises(ValueError): floor(OUT_OF_RANGE_LOWER, OPTIONS)
def test_floor_sorted(): assert floor(VALID_LOWER, OPTIONS) == floor(VALID_LOWER, OPTIONS_SORTED) assert floor(VALID_UPPER, OPTIONS) == floor(VALID_UPPER, OPTIONS_SORTED) assert floor(VALID_BETWEEN, OPTIONS) == floor(VALID_BETWEEN, OPTIONS_SORTED)
def test_floor_oor_upper(): assert max(OPTIONS) == floor(OUT_OF_RANGE_UPPER, OPTIONS)
def test_floor_basic(): assert floor(VALID_LOWER, OPTIONS) == VALID_LOWER assert floor(VALID_UPPER, OPTIONS) == VALID_UPPER assert floor(VALID_LOWER, OPTIONS) == 247