diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afbfae9..d7ea8c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,16 +13,16 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip pip install tox - + - name: Run tox -e lint run: tox - env: + env: TOXENV: lint test: @@ -34,23 +34,23 @@ jobs: toxenv: - py36-dj22-wag211 - py36-dj22-waglatest - - py36-dj31-waglatest - - py38-dj22-wag211 - - py38-dj22-waglatest - - py38-dj31-waglatest + - py36-dj32-waglatest + - py39-dj22-wag211 + - py39-dj22-waglatest + - py39-dj32-waglatest include: - toxenv: py36-dj22-wag211 python-version: 3.6 - toxenv: py36-dj22-waglatest python-version: 3.6 - - toxenv: py36-dj31-waglatest + - toxenv: py36-dj32-waglatest python-version: 3.6 - - toxenv: py38-dj22-wag211 - python-version: 3.8 - - toxenv: py38-dj22-waglatest - python-version: 3.8 - - toxenv: py38-dj31-waglatest - python-version: 3.8 + - toxenv: py39-dj22-wag211 + python-version: 3.9 + - toxenv: py39-dj22-waglatest + python-version: 3.9 + - toxenv: py39-dj32-waglatest + python-version: 3.9 steps: - uses: actions/checkout@v1 @@ -69,7 +69,7 @@ jobs: run: | tox coveralls - env: + env: TOXENV: ${{ matrix.toxenv }} COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/tox.ini b/tox.ini index 8f0cc9f..91afd3f 100644 --- a/tox.ini +++ b/tox.ini @@ -2,29 +2,30 @@ skipsdist=True envlist= lint, - py{36,38}-dj{22,31}-wag{211,latest} + py{36,39}-dj{22}-wag{211,latest} + py{36,39}-dj{32}-wag{latest} [testenv] install_command=pip install -e ".[testing]" -U {opts} {packages} commands= coverage erase - coverage run --source='treemodeladmin' {envbindir}/django-admin.py test {posargs} + coverage run --source='treemodeladmin' {envbindir}/django-admin test {posargs} coverage report -m setenv= DJANGO_SETTINGS_MODULE=treemodeladmin.tests.settings basepython= py36: python3.6 - py38: python3.8 + py39: python3.9 deps= dj22: Django>=2.2,<2.3 - dj31: Django>=3.1,<3.2 + dj32: Django>=3.2,<3.3 wag211: wagtail>=2.11,<2.12 waglatest: wagtail<3 [testenv:lint] -basepython=python3.6 +basepython=python3.9 deps= black flake8 @@ -35,7 +36,7 @@ commands= isort --check-only --diff treemodeladmin [flake8] -ignore=E731,W503,W504 +ignore=E732,W503,W504 exclude= .git, .tox, diff --git a/treemodeladmin/templatetags/treemodeladmin_tags.py b/treemodeladmin/templatetags/treemodeladmin_tags.py index 8673c32..1eb0275 100644 --- a/treemodeladmin/templatetags/treemodeladmin_tags.py +++ b/treemodeladmin/templatetags/treemodeladmin_tags.py @@ -13,7 +13,7 @@ "treemodeladmin/includes/tree_result_list.html", takes_context=True ) def tree_result_list(context): - """ Displays the headers and data list together with a link to children """ + """Displays the headers and data list together with a link to children""" context = result_list(context) return context diff --git a/treemodeladmin/tests/test_options.py b/treemodeladmin/tests/test_options.py index 3c87e9c..596a75e 100644 --- a/treemodeladmin/tests/test_options.py +++ b/treemodeladmin/tests/test_options.py @@ -92,11 +92,11 @@ def test_get_index_view_extra_css_none(self): ) def test_get_admin_urls_for_registration_child(self): - self.assertEqual( + self.assertGreaterEqual( len(self.author_model_admin.get_admin_urls_for_registration()), 8 ) def test_get_admin_urls_for_registration_no_child(self): - self.assertEqual( + self.assertGreaterEqual( len(self.book_model_admin.get_admin_urls_for_registration()), 4 ) diff --git a/treemodeladmin/tests/treemodeladmintest/apps.py b/treemodeladmin/tests/treemodeladmintest/apps.py index c1db903..34fbd71 100644 --- a/treemodeladmin/tests/treemodeladmintest/apps.py +++ b/treemodeladmin/tests/treemodeladmintest/apps.py @@ -4,5 +4,5 @@ class TreeModelAdminTestAppConfig(AppConfig): name = "treemodeladmin.tests.treemodeladmintest" - label = "test_treemodeladmintest" + label = "treemodeladmintest" verbose_name = _("Test Tree Model Admin")