mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
Configuring an online account generates a key, we would like this code-path tested too. So add some functionality to the AccountManager to not use the pre-generated keys. Because this slows down interactively running the tests by hand add an ignored marker which only runs if --ignored is used. This name was chosen because this matches the naming used by rust/cargo #[ignored]. The difference however is that --ignored on cargo *only* runs ignored tests while here it runs *all* tests. To ensure the ignored/slow tests are run on CI we add it as an argument to the tox configuration, which is used by the CI to run the tests.
77 lines
1.3 KiB
INI
77 lines
1.3 KiB
INI
[tox]
|
|
# make sure to update environment list in travis.yml and appveyor.yml
|
|
envlist =
|
|
py37
|
|
lint
|
|
auditwheels
|
|
|
|
[testenv]
|
|
commands =
|
|
pytest -n6 --reruns 2 --reruns-delay 5 -v -rsXx --ignored {posargs:tests}
|
|
python tests/package_wheels.py {toxworkdir}/wheelhouse
|
|
passenv =
|
|
TRAVIS
|
|
DCC_RS_DEV
|
|
DCC_RS_TARGET
|
|
DCC_PY_LIVECONFIG
|
|
CARGO_TARGET_DIR
|
|
RUSTC_WRAPPER
|
|
deps =
|
|
pytest
|
|
pytest-rerunfailures
|
|
pytest-timeout
|
|
pytest-xdist
|
|
pdbpp
|
|
requests
|
|
|
|
[testenv:auditwheels]
|
|
skipsdist = True
|
|
deps = auditwheel
|
|
commands =
|
|
python tests/auditwheels.py {toxworkdir}/wheelhouse
|
|
|
|
[testenv:lint]
|
|
skipsdist = True
|
|
skip_install = True
|
|
deps =
|
|
flake8
|
|
# pygments required by rst-lint
|
|
pygments
|
|
restructuredtext_lint
|
|
commands =
|
|
flake8 src/deltachat
|
|
flake8 tests/
|
|
rst-lint --encoding 'utf-8' README.rst
|
|
|
|
[testenv:doc]
|
|
changedir=doc
|
|
deps =
|
|
sphinx==2.2.0
|
|
breathe
|
|
commands =
|
|
sphinx-build -Q -w toxdoc-warnings.log -b html . _build/html
|
|
|
|
|
|
[testenv:lintdoc]
|
|
skipsdist = True
|
|
usedevelop = True
|
|
deps =
|
|
{[testenv:lint]deps}
|
|
{[testenv:doc]deps}
|
|
commands =
|
|
{[testenv:lint]commands}
|
|
{[testenv:doc]commands}
|
|
|
|
|
|
|
|
[pytest]
|
|
addopts = -v -ra --strict-markers
|
|
python_files = tests/test_*.py
|
|
norecursedirs = .tox
|
|
xfail_strict=true
|
|
timeout = 90
|
|
timeout_method = thread
|
|
|
|
[flake8]
|
|
max-line-length = 120
|