Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7335f0a

Browse files
Kab1rpganssle
authored andcommitted
test(datetime): add test for datetime.UTC alias
1 parent 1e8257d commit 7335f0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/datetimetester.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def test_constants(self):
6767
self.assertEqual(datetime.MINYEAR, 1)
6868
self.assertEqual(datetime.MAXYEAR, 9999)
6969

70+
def test_utc_alias(self):
71+
self.assertIs(UTC, timezone.utc)
72+
7073
def test_all(self):
7174
"""Test that __all__ only points to valid attributes."""
7275
all_attrs = dir(datetime_module)

0 commit comments

Comments
 (0)