-
Notifications
You must be signed in to change notification settings - Fork 17
/
tox.ini
32 lines (31 loc) · 1.03 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[tox]
isolated_build = True
toxworkdir={env:TOX_WORK_DIR:.tox}
envlist = py{311,312}-django{420,500}-drf{315}
[testenv]
allowlist_externals =
bash
deps =
django420: django>=4.2,<4.3
django500: django>=5.0,<5.1
drf315: djangorestframework>=3.15,<3.16
setenv =
PYTHONWARNINGS = d
# Install the dependencies managed by Poetry, except for Django (which was
# already installed by tox). This prevents Poetry from overwriting the version
# of Django we're trying to test with the version in the lock file.
# Adapted from here: https://github.com/python-poetry/poetry/discussions/4307
commands_pre =
bash -c 'poetry export --all-extras --with dev --without-hashes -f requirements.txt | \
grep -v "^[dD]jango==" | \
grep -v "^djangorestframework==" | \
pip install --no-deps -r /dev/stdin'
commands =
flake8 src/logpipe sandbox
mypy src/logpipe
{envpython} -m coverage run \
{toxinidir}/manage.py test \
logpipe.tests.unit \
-v 2 \
--buffer
coverage report