Advanced testing with Pytest
Create custom Pytest fixtures for reusable code and improve multi-input tests with parametrize.
Learning objectives
By the end of this module, you'll be able to:
- Use the
pytest
framework and its library helpers to solve common testing problems - Work with parametrize to create tests from multiple input values
- Create fixtures, which allows you to extend and share testing functionality
Prerequisites
- Ability to write Python scripts
- Familiarity with command-line tools and executing scripts
- Python 3.6 or later and a virtual environment with Pytest installed on your computer. Follow the steps in the Install Python 3 module. At the top of the article, choose the instructions for your configuration: Windows, Linux, or macOS.