-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
53 lines (46 loc) · 1.34 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
52
53
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py36, py39, py311, flake8, rst-lint, docs
# https://tox.wiki/en/latest/faq.html#testing-end-of-life-python-versions
# needed to test against 3.6
requires = virtualenv<20.22.0
[testenv]
# changedir = {envtmpdir}
deps =
pytest
pytest-qt
pytest-xvfb
pytest-console-scripts
allowlist_externals =
/usr/bin/xvfb-run
# --test-scripts is a custom option: check running scripts that should be installed
commands = pytest -vv --doctest-modules -m "not script"
[testenv:flake8]
skip_install = true
deps =
flake8
commands = flake8 geoptics/ tests/ setup.py
[testenv:docs]
basepython = python3.9
changedir = docs
deps =
sphinx
sphinxcontrib-napoleon
sphinx_rtd_theme
# needs python >= 3.5
PyQt5
# avoid QStandardPaths: XDG_RUNTIME_DIR not set
passenv = XDG_RUNTIME_DIR
# xvfb-run prevents Could not connect to any X display
commands = /usr/bin/xvfb-run sphinx-build --color -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:rst-lint]
skip_install = true
deps =
restructuredtext_lint
# needed for sections such as .. code-block:: shell
Pygments
commands =
rst-lint {toxinidir}/README.rst