From the course: Create an Open-Source Project in Python

Unlock the full course today

Join today to access over 23,000 courses taught by industry experts.

tox basic usage

tox basic usage

- [speaker] Now that we understand tox, and its purpose in our project, let's use it. We'll use Tox.ini, created in the last chapter, as the home to our tox setup. So let's start there. So far we only have the flake8 settings, and we need to add the tox settings. Okay, let's stop for a second, and let me explain. We set isolated builds to True because we are using Poetry for the build, and we don't want tox to use setup.py and setup.config. Which is the older way of storing Python project settings. We use pyproject.toml instead. Next, the envlist settings allow us to set up multiple environments for testing such as, testing for different Python versions. Here, As a start, we're only using Python 3.10. Remember, that our project supports any versions of Python above 3.8. We may want to test all of those as well. We will see how to do it later in this chapter. Next, let's add the settings for the testing environment. So…

Contents