-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
executable file
·51 lines (44 loc) · 1.25 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[pytest]
addopts = --reuse-db -x
DJANGO_SETTINGS_MODULE = tests.settings
[flake8]
max-line-length = 99
exclude = *migrations/*
[tox]
envlist=
py39-django42
py39-flake8
[testenv]
passenv =
# Tests will run against the same db (mysql or sqlite) that you're using
# in your development environment.
# In docker, tests run under mysql, because that PES_BACKEND is explicitly
# set in docker-compose.
PES_BACKEND
whitelist_externals =
python
pip
deps =
pipenv
skip_install = true
commands =
pipenv update
pipenv install --dev --ignore-pipfile
# The assert=plain flag here is critical. Otherwise tests fail in the Docker
# environment in the process of rewriting .pyc files to allow assertion
# introspection - possibly mismatches in bytecode between compiled Python
# in the Docker vs localhost environments due to architecture differences.
pipenv run py.test --assert=plain
# Reset to original dependencies.
pipenv install --dev --ignore-pipfile
[testenv:py39-django42]
basepython = python3.9
[testenv:py39-flake8]
basepython = python3.9
deps =
pipenv
flake8
skip_install = true
commands =
pipenv install --dev --ignore-pipfile
pipenv run flake8 setup.py premis_event_service tests