Skip to content

Commit b390204

Browse files
committed
Make the main py3 tox environment an alias/merge of other test environments
Having tox call tox is a bit weird, but the alternatives are: - duplication of the test command, which is a bit sad - replacing all the positive factors with conjunction of negative factors, e.g. `core` -> `!db-!server`, which makes the logic painful to follow One day, tox will have environment aliases which will make this horror moot :-) (Idea pulled from a comment in tox-dev/tox#427)
1 parent 6f27106 commit b390204

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

tox.ini

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,21 @@ deps =
88
db: .[db]
99
db: pifpaf
1010
server: .[http]
11+
cover: pytest-cov
1112
commands =
1213
db: pifpaf run postgresql -- \
1314
pytest --doctest-modules \
15+
slow: --hypothesis-profile=slow \
16+
cover: --cov={envsitepackagesdir}/swh/core --cov-branch \
1417
core: {envsitepackagesdir}/swh/core/tests \
1518
db: {envsitepackagesdir}/swh/core/db/tests \
1619
server: {envsitepackagesdir}/swh/core/api/tests \
1720
{posargs}
1821

1922
[testenv:py3]
20-
deps =
21-
.[testing]
22-
pytest-cov
23-
pifpaf
24-
commands =
25-
pifpaf run postgresql -- \
26-
pytest --doctest-modules \
27-
--hypothesis-profile=slow \
28-
--cov={envsitepackagesdir}/swh/core --cov-branch \
29-
{envsitepackagesdir}/swh/core {posargs}
23+
skip_install = true
24+
deps = tox
25+
commands = tox -e py3-core-db-server-slow-cover -- {posargs}
3026

3127
[testenv:flake8]
3228
skip_install = true

0 commit comments

Comments
 (0)