diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index c3930252948fd9..1372452253fced 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -10570,6 +10570,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__."""