Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 862a2fb

Browse files
committed
test: add nox support for local multi-version testing
1 parent 9304f08 commit 862a2fb

File tree

4 files changed

+69
-3
lines changed

4 files changed

+69
-3
lines changed

noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import nox
2+
3+
4+
@nox.session(python=["3.10", "3.11", "3.12", "pypy3.10"])
5+
def tests(session):
6+
session.run("poetry", "install", external=True)
7+
session.run("poetry", "run", "pytest", external=True)

poetry.lock

Lines changed: 54 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ sqlalchemy = "^2.0.29"
2929
geoalchemy2 = "^0.14.6"
3030
shapely = "^2.0.3"
3131
pre-commit = "^3.7.0"
32+
nox = "^2024.4.15"
3233

3334
[tool.poetry.group.lambda]
3435
optional = true

scripts/test

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ set -e
44

55
function usage() {
66
echo -n \
7-
"Usage: $(basename "$0")
8-
Start the application including the backend.
7+
"Usage: $(basename "$0") [--nox]
8+
Run the test suite using pytest, optionally using nox
99
"
1010
}
1111

1212
if [ "${1:-}" = "--help" ]; then
1313
usage
14+
exit 0
15+
fi
16+
17+
if [ "${1:-}" = "--nox" ]; then
18+
poetry run nox
1419
else
1520
poetry run pytest "$@"
1621
fi

0 commit comments

Comments
 (0)