Changeset View
Changeset View
Standalone View
Standalone View
tox.ini
[tox] | [tox] | ||||
envlist = black,flake8,mypy,py3 | envlist = black,flake8,mypy,py3 | ||||
[testenv] | [testenv] | ||||
extras = | extras = | ||||
testing | testing | ||||
deps = | deps = | ||||
pytest-cov | pytest-cov | ||||
commands = | commands = | ||||
# Under certain circumstances (e.g. in jenkins), the swh.journal kafka server | |||||
# fixture (which makes librdkafka spawn internal threads, that can't be torn | |||||
# down), and the swh.provenance rabbitmq storage server fixture (which is | |||||
# brought up by multiprocessing within the pytest runner context) poorly | |||||
# interact, causing the Python interpreter to SIGABRT. | |||||
# Running the tests for the journal client separately from the rest allow to | |||||
vlorentz: please add a comment to explain it's necessary because of the rdkafka teardown issues | |||||
# isolate the fixtures from one another and lets the tests run to completion. | |||||
pytest {envsitepackagesdir}/swh/provenance \ | |||||
--cov={envsitepackagesdir}/swh/provenance \ | |||||
--cov-branch \ | |||||
-k 'journal' {posargs} | |||||
pytest --doctest-modules \ | pytest --doctest-modules \ | ||||
{envsitepackagesdir}/swh/provenance \ | {envsitepackagesdir}/swh/provenance \ | ||||
--cov={envsitepackagesdir}/swh/provenance \ | --cov={envsitepackagesdir}/swh/provenance \ | ||||
--cov-branch {posargs} | --cov-branch --cov-append \ | ||||
-k 'not journal' {posargs} | |||||
passenv = HOME # required by pytest-rabbitmq | passenv = HOME # required by pytest-rabbitmq | ||||
[testenv:black] | [testenv:black] | ||||
skip_install = true | skip_install = true | ||||
deps = | deps = | ||||
black==22.3.0 | black==22.3.0 | ||||
commands = | commands = | ||||
{envpython} -m black --check swh | {envpython} -m black --check swh | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
please add a comment to explain it's necessary because of the rdkafka teardown issues