Mbpp/102

⚠️ 仅 Base 通过 Base: PASS Plus: FAIL
测试评估
指标结果
Base 测试PASS
Plus 测试FAIL
代码长度347 字符
模型生成的代码 (347 字符)
def snake_to_camel(s: str) -> str:
    """
    Convert a snake_case string to CamelCase (PascalCase).

    Example:
    >>> snake_to_camel('python_program')
    'PythonProgram'
    """
    # Split the string by underscores and capitalize each part,
    # then join them back together.
    return ''.join(word.capitalize() for word in s.split('_'))
Base 失败测试用例
  • 无失败测试
Plus 失败测试用例
  • ['___python_program']