This lesson is being piloted (Beta version)

Introduction to automated testing and continuous integration in Python: Setup

Python

If you do not already have a Python installation that you are happy with, then follow the instructions in the Software Carpentry workshop template lesson to get set up.

pytest

Depending how you installed Python, you may already have pytest installed. To check this, open a terminal and run:

$ pytest --version

This should output the version of pytest that you have installed; for example:

pytest 6.2.2

If instead you get an error, you will need to install pytest using pip:

$ pip install pytest

Git

To interact with continuous integration, you will need to be able to use the Git version control system. If you don’t already have Git installed, then follow the instructions in the Software Carpentry workshop template to get Git set up.

GitHub

To interact with continuous integration using GitHub Actions, you need to have a GitHub account. To do this, visit GitHub and sign up for an account, or check that you’re able to log in.

Download files

We’ll be working with some existing pieces of example software for this lesson. Download this archive and extract it to a convenient location—for example, your desktop.