Skip to content
Snippets Groups Projects
Commit 6b426eda authored by David Douard's avatar David Douard
Browse files

tests,tox: do test each 'extra' environment in a dedicated venv

to make sure each extra setup dependencies are ok.
This requires to move test files in its related subpackage.
parent c8aa7602
No related branches found
No related tags found
No related merge requests found
File moved
File moved
File moved
......@@ -11,7 +11,7 @@ from hypothesis import strategies, given
import pytest
from swh.core.db import BaseDb
from swh.core.tests.db_testing import (
from .db_testing import (
SingleDbTestFixture, db_create, db_destroy, db_close,
)
......
[tox]
envlist=flake8,py3
envlist=flake8,py3-{core,db,server}
[testenv:py3]
[testenv:py3-core]
deps =
.[testing]
pytest-cov
-rrequirements-test.txt
.
commands =
pytest --doctest-modules swh/core/tests {posargs}
[testenv:py3-db]
deps =
-rrequirements-test.txt
.[db]
pifpaf
commands =
pifpaf run postgresql -- pytest --doctest-modules --hypothesis-profile=fast --cov=swh --cov-branch {posargs}
pifpaf run postgresql -- \
pytest swh/core/db/tests {posargs}
[testenv:py3-slow]
[testenv:py3-server]
deps =
-rrequirements-test.txt
.[http]
commands =
pytest swh/core/api/tests {posargs}
[testenv:py3]
deps =
.[testing]
pytest-cov
pifpaf
commands =
pifpaf run postgresql -- pytest --doctest-modules --hypothesis-profile=slow --cov=swh --cov-branch {posargs}
pifpaf run postgresql -- \
pytest --doctest-modules \
--hypothesis-profile=slow \
--cov=swh --cov-branch \
{posargs}
[testenv:flake8]
skip_install = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment