mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #15973: Fixed segmentation fault on timezone comparison to other types.
This commit is contained in:
parent
4e12ad19c9
commit
3ec153681e
3 changed files with 11 additions and 3 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