Skip to content

Commit

Permalink
docs: update unit test documentation (#3220)
Browse files Browse the repository at this point in the history
We are now telling the user to run make deps before calling tox
and also removing any mention to pyenv, as we don't use that
anymore for our tests.

Fixes: #2892
  • Loading branch information
lucasmoura authored Jul 24, 2024
1 parent e910f45 commit 93bc662
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dev-docs/howtoguides/unit_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

Before proceeding with the unit tests, please ensure you have completed the setup instructions in the [Getting Started Tutorial](../tutorials/getting-started.md). This guide covers essential setup information required to run the tests.

All unit and lint tests are run using `tox`, with different versions of Python with specific constraints. We also use `tox-setuptools-version` to specify the correct setuptools version based on what is present in each release, and `tox-pyenv` to recognize the different local [pyenv interpreters](https://github.com/pyenv/pyenv).

First, run the script to install and configure `pyenv`, and the `tox` dependencies:
All unit and lint tests are run using `tox`. However, before we can run our tests, we need to
install some package dependencies. This can be achieved through our Makefile script. To install those
dependencies, first install this package:

```shell
./tools/setup_pyenv.sh
sudo apt install make
```

After that you need to [set up your shell environment](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv), according to the pyenv documentation.
The guide has quick snippets to configure `bash`, `zsh` and `fish` shells.
Once that package is installed, just run the command which will install all of the necessary dependencies.

```shell
sudo make deps
```

Refresh your terminal to make sure pyenv is working. Then you can run the unit and lint tests:
After that, you can run the unit and lint tests:

```shell
tox
Expand Down

0 comments on commit 93bc662

Please sign in to comment.