Easy Prompt
CodingCodeIntermediate

Python 函数测试设计

要求模型为一个边界丰富的函数设计测试集。

Prompt Content

Copy and paste directly into your model or internal evaluation tool.

函数 normalize_email(email: str) 会去掉首尾空格、把域名转小写、拒绝缺少 @ 的输入。请设计不少于 8 个单元测试,覆盖正常、异常、边界和国际化相关情况,并说明每类测试目的。

Use Cases

测试生成评测

Reference Output

应覆盖空格、域名大小写、本地部分大小写、缺 @、多个 @、空字符串、unicode、子域名等。

Scoring Rubric

看覆盖面、断言明确性和是否误改本地部分大小写。

Try & save

Fill variables and copy, or save as a personal template.

This template has no variables and is ready to copy.

User Rating

0 ratings
-

Your rating

Log in to rate

Comments

0

Log in to comment

Related Prompts