Skip to content

Commit

Permalink
Add Django main to tox envlist
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Nov 15, 2021
1 parent ac76775 commit ab263af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pytest_django/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _django_db_fixture_helper(
transactional: bool = False,
reset_sequences: bool = False,
) -> None:
from django import VERSION

if is_django_unittest(request):
return

Expand Down Expand Up @@ -175,6 +177,8 @@ class PytestDjangoTestCase(test_case_class): # type: ignore[misc,valid-type]
databases = _databases

PytestDjangoTestCase.setUpClass()
if VERSION >= (4, 0):
request.addfinalizer(PytestDjangoTestCase.doClassCleanups)
request.addfinalizer(PytestDjangoTestCase.tearDownClass)

test_case = PytestDjangoTestCase(methodName="__init__")
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
envlist =
py310-dj32-postgres
py39-dj{32,31,30,22}-postgres
py38-dj{32,31,30,22}-postgres
py310-dj{main,32}-postgres
py39-dj{main,32,31,30,22}-postgres
py38-dj{main,32,31,30,22}-postgres
py37-dj{32,31,30,22}-postgres
py36-dj{32,31,30,22}-postgres
py35-dj{22}-postgres
Expand Down

0 comments on commit ab263af

Please sign in to comment.