diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 2c6a5c7466032d..2c99b221e52d1f 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -10859,6 +10859,10 @@ def test_no_attributes(self): with self.assertRaises(AttributeError): type(NoDefault).foo + def test_no_subclassing(self): + with self.assertRaises(TypeError): + class Test(type(NoDefault)): ... + class AllTests(BaseTestCase): """Tests for __all__."""