Skip to content

Commit

Permalink
Adjuts imports, scripts and docs to point to the new test layout
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Nov 9, 2023
1 parent deb761c commit 0f1f4e6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/developing/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ To run the backend test suite only call ``tox`` directly. For example:
tox -qe functests
# Run only one test directory or test file:
tox tests/h/models/annotation_test.py
tox tests/unit/h/models/annotation_test.py
tox -qe functests tests/functional/api/test_profile.py
# To pass arguments to pytest put them after a `--`:
tox -- --exitfirst --pdb --failed-first tests/h
tox -- --exitfirst --pdb --failed-first tests/unit/h
tox -qe functests -- --exitfirst --pdb --failed-first tests/functional
# See all of pytest's command line options:
Expand Down
Empty file added tests/unit/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion tests/unit/h/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def invalid_form(errors=None):
@pytest.fixture
def matchers():
# pylint: disable=redefined-outer-name, import-outside-toplevel
from ..common import matchers
from tests.common import matchers

return matchers

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/h/services/bulk_executor/_actions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
GroupUpsertAction,
UserUpsertAction,
)
from tests.h.services.bulk_executor.conftest import (
from tests.unit.h.services.bulk_executor.conftest import (
AUTHORITY,
group_membership_create,
group_upsert_command,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/h/services/bulk_executor/_executor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pytest import param

from h.services.bulk_executor._executor import BulkExecutor
from tests.h.services.bulk_executor.conftest import (
from tests.unit.h.services.bulk_executor.conftest import (
AUTHORITY,
group_upsert_command,
upsert_user_command,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ commands =
checkformatting: black --check h tests bin
checkformatting: isort --quiet --check-only h tests bin
{tests,functests}: sh bin/create-testdb
tests: python -m pytest --cov --cov-report= --cov-fail-under=0 --numprocesses logical --dist loadgroup {posargs:tests/h/}
tests: python -m pytest --cov --cov-report= --cov-fail-under=0 --numprocesses logical --dist loadgroup {posargs:tests/unit/h/}
functests: pytest {posargs:tests/functional/}
docs: sphinx-autobuild -qT --open-browser -b dirhtml -d {envdir}/doctrees docs {envdir}/html
checkdocs: sphinx-build -qTWn -b dirhtml -d {envdir}/doctrees docs {envdir}/html
Expand Down

0 comments on commit 0f1f4e6

Please sign in to comment.