Python — From Basics to Advanced · Testing with pytest
First Tests
Testing with pytest
Introduction
pytest auto-discovers tests: test_*.py files, test_* functions. Assertions use plain assert. No boilerplate — that's pytest's biggest advantage over unittest.