diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 5d19e3706802dd..ad644bb3128809 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -11131,6 +11131,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__."""