← Back to courses
SQA and Testing

Testing Python with pytest

One week to tests you trust

A one-week classroom course on the pytest getting-started page and its first how-to guides: writing and running tests, assertions, fixtures, marks, parametrisation and temporary directories. This course prepares for no exam.

6Modules
IntermediateLevel
1 weekDuration
COURSE THUMBNAIL

What you will be able to do

Write and run a pytest suite
Share set-up through fixtures
Run one test over many inputs

Course outline

01
Installing pytest; your first test
02
Invoking pytest and running multiple tests
03
Writing assertions; asserting that an exception is raised
04
Using fixtures
05
Marks and parametrised tests
06
Temporary directories; skip and xfail

Tools you will use

pytestPythonVisual Studio Code

What you need

Basic Python

Related courses