An automated test suite makes it much easier to maintain, extend and debug your Python code. In this course we will learn how to write automated tests in Python using the pytest library. After introducing the key concepts, the majority of the course will be hands-on, writing and running tests.
This repo contains a simple Python project including a test suite to accompany the SSC compact course "Introduction to Python Testing".
Continuous integration is set up using Github actions which automatically runs the tests whenever a pull request is made.
To clone the repo:
git clone https://github.com/ssciwr/python-testing-intro.git
cd python-testing-intro
To install the required Python libraries:
python -m pip install -r requirements.txt
To run the tests:
python -m pytest
This repository was set up using the SSC Cookiecutter for Python Packages.