mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Closes #15973: fix a segmentation fault when comparing timezone objects.
This commit is contained in:
parent
fd296ff5d6
commit
0085a24075
4 changed files with 13 additions and 0 deletions
|
@ -235,6 +235,8 @@ class TestTimeZone(unittest.TestCase):
|
|||
self.assertEqual(timezone(-5 * HOUR), timezone(-5 * HOUR, 'EST'))
|
||||
with self.assertRaises(TypeError): timezone(ZERO) < timezone(ZERO)
|
||||
self.assertIn(timezone(ZERO), {timezone(ZERO)})
|
||||
self.assertTrue(timezone(ZERO) != None)
|
||||
self.assertFalse(timezone(ZERO) == None)
|
||||
|
||||
def test_aware_datetime(self):
|
||||
# test that timezone instances can be used by datetime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue