test: convert to pytest

Instead of built-in `unittest`, now use `pytest`. Find versions that work, convert tests.

ref: N25B-168
This commit is contained in:
Twirre Meulenbelt
2025-10-21 13:55:06 +02:00
parent 45be0366ba
commit 5631a55697
5 changed files with 166 additions and 158 deletions

View File

@@ -105,11 +105,15 @@ With both, if you want to connect to the actual robot (or simulator), pass the `
To run the unit tests, on Linux and macOS:
```shell
PYTHONPATH=src python -m unittest discover -s test -p "test_*.py" -v
PYTHONPATH=src pytest test/
```
On Windows:
```shell
$env:PYTHONPATH="src"; python -m unittest discover -s test -p "test_*.py" -v
$env:PYTHONPATH="src"; pytest test/
```
### Coverage
For coverage, add `--cov=robot_interface` as an argument to `pytest`.