New here? See how enrollment works →
Python, Flask & DjangoIntermediateSelf-paced practical course

Python Testing Basics

Test Python code with pytest: fixtures, parametrization and mocks.

3 weeks duration~9 learning hours120-day course access4 modules

What you'll learn

  • Write tests with pytest and assert
  • Share setup with fixtures
  • Parametrize tests
  • Mock external calls

About this course

You add tests to a small Python package. You learn pytest structure, fixtures, parametrized tests, mocking and coverage.

Course curriculum

4 modules and 12 lessons over 3 weeks. Plan for about 9 learning hours.

01pytest basicsWeek 1 · 3 lessons
  1. Test discovery
  2. assert
  3. Running tests
02FixturesWeek 1 · 3 lessons
  1. Fixtures
  2. Scopes
  3. tmp_path
03PatternsWeek 2 · 3 lessons
  1. Parametrize
  2. Testing errors
  3. Mocks
04Tested packageWeek 3 · 3 lessons
  1. Adding tests
  2. Coverage
  3. CI run

Project

Tested package. A small Python package with pytest tests and a coverage report.

Who this course is for

Python developers who don't write tests yet.

Prerequisites

You write Python functions and modules.

What's included

  • 120-day course access
  • Step-by-step lessons
  • Practice files
  • Reusable code templates
  • A graded final exercise
  • A digital completion certificate

Learning format

Self-paced practical course, part of our self-paced courses. Graded final exercise with written feedback.

Access and delivery

  1. Enrollment is activated within 15 minutes after payment.
  2. Final exercise feedback is delivered within 2 business days of submission, and the completion certificate is issued within 2 business days after passing the final exercise.

Certificate

You receive a digital completion certificate. Final exercise feedback is delivered within 2 business days of submission, and the completion certificate is issued within 2 business days after passing the final exercise.

Frequently asked questions

When does access start?

Enrollment is activated within 15 minutes after payment.

Is payment taken on this website?

No. After you submit your enrollment request, we reply by email with payment details and enrollment confirmation.

Does this course guarantee a job or income?

No. It is an education and training service and does not include employment, income or placement guarantees.

Can I cancel?

Our Refund and Cancellation Policy lists the terms for self-paced course programs.

Related courses in Python

$299