def test_validate_float_option_exception_message_contains_correct_info(): msg = "dummy" str_val = "abcde" with pytest.raises(SchemaError) as exc_info: validate_float_option(str_val, msg) check_exception_message(exc_info, msg, str_val)
def test_validate_float_option_raises_exception_for_non_float(): with pytest.raises(SchemaError): validate_float_option("a", "dummy")
def test_validate_float_option_returns_correct_value(): float_val = 0.3532 assert validate_float_option(str(float_val), "dummy") == float_val