Step 1: Install Pytest
Pytest is a popular testing framework for Python. To install it, ensure you have Python 3.10+ or PyPy3 installed.
Run the following command in your terminal:
This installs the latest version (as of December 2025, version 9.0.2). Verify installation by running pytest --version.