Test files should take the form *_test.py
and tests inside files should be top-level functions named test_*()
.
Tests should typically:
- test a single aspect of the code (e.g., to test feature
a
andb
, use two separate test functions), - only test the interface (e.g., tests should not check internal implementation details), and
- tests should not rely on the order in which they are executed.