Overview - Test naming conventions
What is it?
Test naming conventions are rules or guidelines for naming test functions and files in pytest. They help organize tests so that pytest can find and run them automatically. Good names make tests easy to understand and maintain. They usually include prefixes or patterns that pytest recognizes.
Why it matters
Without clear naming conventions, tests can be hard to find, run, or understand. This slows down development and debugging. If pytest cannot detect tests because of wrong names, tests won't run, causing bugs to slip into production. Good naming conventions make testing reliable and efficient, saving time and effort.
Where it fits
Before learning test naming conventions, you should know basic Python functions and how pytest runs tests. After this, you can learn about test organization, fixtures, and advanced pytest features like parametrization and markers.