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 ratingsYour rating
Log in to rate
Comments
0Log in to comment
Related Prompts
The Greatest Computer Science Tutor
An AI-powered tutor based on curated college textbooks, enabling simultaneous theory and code learning with personalized, interactive instruction and advanced visualization support.
Anti-AI-Slop Design Architect
An opinionated frontend design skill prompt that enforces structural variety, honest copy, locked design tokens, and a hard mobile-responsiveness floor, then verifies output against an anti-slop gate battery.
Interactive Codebase Course Architect
Transforms any codebase into a beautiful, interactive single-page HTML course that teaches how the code works — no setup required, runs entirely in the browser
HTML PPT Studio Designer
A professional static HTML presentation generator with 36 themes, 15 full-deck templates, 31 page layouts, and 47 animations. Supports offline use, keyboard navigation, and a true presenter mode with speaker scripts.