forked from element-hq/matrix-content-scanner-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
45 lines (33 loc) · 1.46 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
[tox]
envlist = py, check_codestyle, check_types
# required for PEP 517 (pyproject.toml-style) builds
isolated_build = true
[testenv:py]
# As of twisted 16.4, trial tries to import the tests as a package (previously
# it loaded the files explicitly), which means they need to be on the
# pythonpath. Our sdist doesn't include the 'tests' package, so normally it
# doesn't work within the tox virtualenv.
#
# As a workaround, we tell tox to do install with 'pip -e', which just
# creates a symlink to the project directory instead of unpacking the sdist.
usedevelop=true
extras = dev
commands =
python -m unittest discover tests
[testenv:check_codestyle]
extras = dev
commands =
flake8 src tests
black --check --diff src tests
isort --check-only --diff src tests
[testenv:check_types]
extras = dev
# The current version of python-olm that's on PyPI does not include a types marker.
# Hopefully that's something we can fix at some point, but in the mean time let's not
# block things on this and instead use the wheels on gitlab.matrix.org's repository (which
# do have a type marker). We use --index-url (and not --extra-index-url) so that pip does
# not try to download the python-olm that's on pypi.org. This is fine because GitLab will
# redirect requests for packages it doesn't know about to pypi.org.
install_command = python -m pip install --index-url=https://gitlab.matrix.org/api/v4/projects/27/packages/pypi/simple {opts} {packages}
commands =
mypy src tests