Skip to main content
Intermediate 8 planned topics Testing

Introduction to Pytest

Learn pytest fixtures, asserts, and Python test layout. Free pytest introduction.

Learning Outcomes

  • Write a test_ function
  • Use a fixture for setup
  • Parametrize inputs
  • Run pytest from the project root

Overview

pytest is the most popular Python test runner. Plain assert statements and fixtures keep tests readable.

This introduction covers test discovery and parametrize.

Use it for homework and production services alike.

What this course will cover

  1. 1. Discovery
  2. 2. Asserts
  3. 3. Fixtures
  4. 4. Parametrize
  5. 5. Markers
  6. 6. Plugins

Start a complete tutorial now

Full 6-level lessons are live for C, C++, Java, Python, and JavaScript. Use them while the remaining Pytest lessons are added.

← All technology tutorials