diff options
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r-- | Lib/test/datetimetester.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index d0101c9..5800487 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -413,6 +413,11 @@ class TestTimeZone(unittest.TestCase): with self.assertRaises(ValueError): timezone(delta) + def test_comparison_with_tzinfo(self): + # Constructing tzinfo objects directly should not be done by users + # and serves only to check the bug described in bpo-37915 + self.assertNotEqual(timezone.utc, tzinfo()) + self.assertNotEqual(timezone(timedelta(hours=1)), tzinfo()) ############################################################################# # Base class for testing a particular aspect of timedelta, time, date and |