测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | FAIL |
| 代码长度 | 364 字符 |
模型生成的代码 (364 字符)
def min_val(lst):
"""
Find the minimum value among numeric elements in a heterogeneous list.
Non-numeric elements (strings, booleans, etc.) are ignored.
"""
numeric = [x for x in lst if isinstance(x, (int, float)) and not isinstance(x, bool)]
if not numeric:
raise ValueError("No numeric values in the list")
return min(numeric)
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
[['Python', 10, 5, 2.5, 2.5, 'version']]