Skip to content

Commit

Permalink
build: Remove tests/ stub; make make test-all work right (#402)
Browse files Browse the repository at this point in the history
- The `tests/__init__.py` create/delete thing seems to have been a
  workaround for something that's no longer relevant, so just remove it.
- Same deal for `test_utils/`.
- The `test-all` target needed to depend on `clean` so that `build/lib`
  wouldn't stick around and confuse pytest, and the recipe needed to be
  pruned down to just `tox` because otherwise we'd run the quality checks
  twice. (`quality` is in the tox.ini default env list.)
  • Loading branch information
timmc-edx authored Apr 3, 2024
1 parent 8ea088d commit 04f1886
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ docs/edx_django_utils.*.rst
requirements/private.in
requirements/private.txt

# tox environment temporary artifacts
tests/__init__.py

# Development task artifacts
default.db

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ test: clean ## run tests in the current virtualenv
diff_cover: test ## find diff lines that need test coverage
diff-cover coverage.xml

test-all: ## run tests on every supported Python/Django combination
tox -e quality
test-all: clean ## run quality checks as well as tests on every supported Python/Django combination
tox

validate: quality test ## run tests and quality checks
Expand Down
7 changes: 0 additions & 7 deletions test_utils/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions tests/test_models.py

This file was deleted.

12 changes: 5 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ deps =
-r{toxinidir}/requirements/quality.txt
setuptools
commands =
touch tests/__init__.py
pylint edx_django_utils tests test_utils manage.py setup.py
rm tests/__init__.py
pycodestyle edx_django_utils tests manage.py setup.py
pydocstyle edx_django_utils tests manage.py setup.py
isort --check-only --diff tests test_utils edx_django_utils manage.py setup.py test_settings.py
pylint edx_django_utils manage.py setup.py
pycodestyle edx_django_utils manage.py setup.py
pydocstyle edx_django_utils manage.py setup.py
isort --check-only --diff edx_django_utils manage.py setup.py test_settings.py
make selfcheck

[testenv:isort]
Expand All @@ -90,4 +88,4 @@ allowlist_externals =
deps =
-r{toxinidir}/requirements/quality.txt
commands =
isort tests test_utils edx_django_utils manage.py setup.py test_settings.py
isort edx_django_utils manage.py setup.py test_settings.py

0 comments on commit 04f1886

Please sign in to comment.