Skip to content

Commit 4fbeb59

Browse files
committed
[Feat] add new django and python for test
1 parent 7ed336c commit 4fbeb59

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
language: python
44

55
python:
6+
- "3.10"
67
- "3.9"
78
- "3.8"
89
- "3.7"
@@ -15,6 +16,8 @@ env:
1516
- DJANGO=20
1617
- DJANGO=22
1718
- DJANGO=31
19+
- DJANGO=32
20+
- DJANGO=40
1821

1922
matrix:
2023
fast_finish: true
@@ -25,8 +28,16 @@ matrix:
2528
env: DJANGO=22
2629
- python: "2.7"
2730
env: DJANGO=31
31+
- python: "2.7"
32+
env: DJANGO=32
33+
- python: "2.7"
34+
env: DJANGO=40
2835
- python: "3.5"
2936
env: DJANGO=31
37+
- python: "3.5"
38+
env: DJANGO=32
39+
- python: "3.5"
40+
env: DJANGO=40
3041

3142
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
3243
install: pip install -r requirements_test.txt

requirements_test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ codecov>=2.0.0
66

77

88
# Additional test requirements go here
9-
psycopg2>=2.7.0
9+
psycopg2-binary>=2.7.0

tests/test_db_comments.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414
from django.test import TestCase
1515
from django.db import models, DEFAULT_DB_ALIAS
16-
from django.utils.translation import ugettext_lazy as _
16+
try:
17+
from django.utils.translation import ugettext_lazy as _
18+
except ImportError:
19+
# django 4.0 removed ugettext_lazy
20+
from django.utils.translation import gettext_lazy as _
1721

1822
from django_db_comments.db_comments import (
1923
get_comments_for_model,

tox.ini

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tox]
22
envlist =
3+
{py38,py39,py310}-django-40
4+
{py38,py39,py310}-django-32
35
{py37,py38,py39}-django-31
46
{py37,py38,py39}-django-22
57
{py35,py36,py37}-django-20
@@ -13,8 +15,11 @@ deps =
1315
django-20: Django>=2.0,<2.1
1416
django-22: Django>=2.2,<3.0
1517
django-31: Django>=3.1,<3.2
18+
django-32: Django>=3.2,<4.0
19+
django-40: Django>=4.0,<4.1
1620
-r{toxinidir}/requirements_test.txt
1721
basepython =
22+
py310: python3.10
1823
py39: python3.9
1924
py38: python3.8
2025
py37: python3.7

0 commit comments

Comments
 (0)