summaryrefslogtreecommitdiff
path: root/tests/timezones
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2025-07-22 20:41:41 -0700
committernessita <124304+nessita@users.noreply.github.com>2025-07-23 20:17:55 -0300
commit69a93a88edb56ba47f624dac7a21aacc47ea474f (patch)
treef57507a4435d032493cae40e06ecb254790b67b2 /tests/timezones
parent55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff)
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'tests/timezones')
-rw-r--r--tests/timezones/tests.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index fd8b49fdef..6c6cbebe17 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -75,7 +75,8 @@ def override_database_connection_timezone(timezone):
try:
orig_timezone = connection.settings_dict["TIME_ZONE"]
connection.settings_dict["TIME_ZONE"] = timezone
- # Clear cached properties, after first accessing them to ensure they exist.
+ # Clear cached properties, after first accessing them to ensure they
+ # exist.
connection.timezone
del connection.timezone
connection.timezone_name
@@ -83,7 +84,8 @@ def override_database_connection_timezone(timezone):
yield
finally:
connection.settings_dict["TIME_ZONE"] = orig_timezone
- # Clear cached properties, after first accessing them to ensure they exist.
+ # Clear cached properties, after first accessing them to ensure they
+ # exist.
connection.timezone
del connection.timezone
connection.timezone_name
@@ -450,8 +452,8 @@ class NewDatabaseTests(TestCase):
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 1, 30, 0, tzinfo=EAT))
Event.objects.create(dt=datetime.datetime(2011, 1, 1, 4, 30, 0, tzinfo=EAT))
with timezone.override(UTC):
- # These two dates fall in the same day in EAT, but in different days,
- # years and months in UTC.
+ # These two dates fall in the same day in EAT, but in different
+ # days, years and months in UTC.
self.assertEqual(Event.objects.filter(dt__year=2011).count(), 1)
self.assertEqual(Event.objects.filter(dt__month=1).count(), 1)
self.assertEqual(Event.objects.filter(dt__day=1).count(), 1)
@@ -1169,7 +1171,8 @@ class TemplateTests(SimpleTestCase):
@skipIf(sys.platform == "win32", "Windows uses non-standard time zone names")
def test_tz_template_context_processor(self):
"""
- Test the django.template.context_processors.tz template context processor.
+ Test the django.template.context_processors.tz template context
+ processor.
"""
tpl = Template("{{ TIME_ZONE }}")
context = Context()