Python module

A single Python source file, ending in .py, whose functions and classes other files can import.

In more detail

In the course each piece of code under test is a small module, such as pricing.py, and each test file imports from it. pytest also uses the word module for a scope: a module-scoped fixture is built once per test file.

Example

from pricing import subtotal, with_vat

Related terms

Taught in

References