mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Issue 9183: Intern UTC timezone.
This commit is contained in:
parent
5bc4fa7a49
commit
1bcbaab15a
4 changed files with 60 additions and 31 deletions
|
@ -176,7 +176,9 @@ class TestTimeZone(unittest.TestCase):
|
|||
|
||||
|
||||
def test_constructor(self):
|
||||
self.assertEqual(timezone.utc, timezone(timedelta(0)))
|
||||
self.assertIs(timezone.utc, timezone(timedelta(0)))
|
||||
self.assertIsNot(timezone.utc, timezone(timedelta(0), 'UTC'))
|
||||
self.assertEqual(timezone.utc, timezone(timedelta(0), 'UTC'))
|
||||
# invalid offsets
|
||||
for invalid in [timedelta(microseconds=1), timedelta(1, 1),
|
||||
timedelta(seconds=1), timedelta(1), -timedelta(1)]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue