Custom coding instructions for AI Agents - Guidelines

What Should You Test For?

Here’s a checklist of things to test in a typical Python function or module:

Test Type What to Check
Correctness Does the function return the expected output for valid inputs?
Edge Cases What happens with empty lists, None, zero, negative numbers, etc.?
Error Handling Does it raise the correct exceptions for invalid inputs?
Performance (optional) Is it fast enough for large inputs? (usually not in unit tests)
Side Effects Does it modify global state, write to disk, or call external services?
Integration Points If it interacts with other modules, are those interactions correct?