Python: Unit Testing with pytest

Wishlist Share

About Course

Write automated tests that catch bugs before your users do. This course introduces pytest: how it finds and runs tests, writing clear assertions, testing for exceptions, using parametrize to test many cases, and fixtures for setup, plus good habits for writing useful tests.

Tutwoo is an independent learning provider. This course is general skills training based on official documentation. It is not an accredited qualification. Software behaviour can change between versions, so check the official documentation for the version you use.

What Will You Learn?

  • Install pytest and run tests from the command line Write tests with plain assert statements and pytest.raises Test many inputs efficiently with parametrize Use fixtures and tmp_path for clean setup and teardown

Course Content

Course Lessons

  • Why test, and getting started
  • Writing good assertions and testing errors
  • Parametrize: many cases, one test
  • Fixtures and good testing habits

Sources & Further Reading
The official guidance this course is based on.

Final Assessment

Student Ratings & Reviews

No Review Yet
No Review Yet

Want to receive push notifications for all major on-site activities?

✕