summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 8bda173..53ad5e5 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -301,6 +301,10 @@ class TestTimeZone(unittest.TestCase):
self.assertIsInstance(timezone.utc, tzinfo)
self.assertIsInstance(self.EST, tzinfo)
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError):
+ class MyTimezone(timezone): pass
+
def test_utcoffset(self):
dummy = self.DT
for h in [0, 1.5, 12]: