Skip to content

Commit f7c431b

Browse files
committed
GitHub Actions: Run tests_with_pytz_installed
1 parent f4194c4 commit f7c431b

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-20.04
1313

1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
python-version:
1718
- '3.6'

docs/api-guide/caching.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ from rest_framework.response import Response
7575

7676
@cache_page(60 * 15)
7777
@vary_on_cookie
78-
@api_view(['GET'])
78+
@api_view(["GET"])
7979
def get_user_list(request):
80-
content = {
81-
'user_feed': request.user.get_user_feed()
82-
}
80+
content = {"user_feed": request.user.get_user_feed()}
8381
return Response(content)
8482
```
8583

requirements/requirements-testing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
pytest>=7.0.1,<8.0
33
pytest-cov>=4.0.0,<5.0
44
pytest-django>=4.5.2,<5.0
5+
pytz
56
importlib-metadata<5.0
67
# temporary pin of attrs
78
attrs==22.1.0

tests/test_fields.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from unittest.mock import patch
1010

1111
import pytest
12+
from django import VERSION as DJANGO_VERSION
1213

1314
try:
1415
import pytz
@@ -672,6 +673,7 @@ def test_valid_inputs(self, *args):
672673
assert self.field.run_validation(input_value) == expected_output, \
673674
'input value: {}'.format(repr(input_value))
674675

676+
@pytest.mark.xfail(pytz and DJANGO_VERSION >= (5, 0), reason="Django v5 drops support for pytz")
675677
def test_invalid_inputs(self, *args):
676678
"""
677679
Ensure that invalid values raise the expected validation error.

0 commit comments

Comments
 (0)