diff --git a/tests/test_fields.py b/tests/test_fields.py index e6e9d17ad..fdd74dd97 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -1625,8 +1625,10 @@ class TestCustomTimezoneForDateTimeField(TestCase): assert rendered_date == rendered_date_in_timezone -@pytest.mark.skipif(pytz is None or django.VERSION >= (5,), - reason="Django 5.0 has removed pytz; this test should eventually be able to get removed.") +@pytest.mark.skipif( + condition=django.VERSION >= (5,), + reason="Django 5.0 has removed pytz; this test should eventually be able to get removed.", +) class TestPytzNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues): """ Invalid values for `DateTimeField` with datetime in DST shift (non-existing or ambiguous) and timezone with DST.