Set up a test suite

- use pytest as the test suite and
  measure test coverage with coverage.py
- add package for the test suite under tests/
- add nox session "test" to run the test suite
  for all supported Python versions
- use flake8 to lint pytest for consistent style
This commit is contained in:
Alexander Hess 2024-09-10 01:38:26 +02:00
commit b8ceee39c5
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 338 additions and 2 deletions

View file

@ -69,6 +69,9 @@ To execute all default tasks, simply invoke:
`nox`
This includes running the test suite for the project's main Python version
(i.e., [3.12](https://devguide.python.org/versions/)).
#### Code Formatting & Linting
@ -93,6 +96,18 @@ The second task lints all source code files with
`flake8` is configured with a couple of plug-ins.
#### Test Suite
We use [pytest](https://docs.pytest.org/en/stable/)
to obtain confidence in the correctness of `lalib`.
To run the tests
for *all* supported Python versions
in isolated (and perfectly reproducable) environments,
invoke:
`nox -s test`
### Branching Strategy
The branches in this repository follow the