From bad9296fb0424bc480fa0ecfd2d60f73c33358f5 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 5 May 2026 17:58:49 +0300 Subject: [PATCH] gh-149410: Test that `typing.NoDefault` is final (#149411) --- Lib/test/test_typing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 5d19e3706802..ad644bb31288 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -11131,6 +11131,10 @@ class NoDefaultTests(BaseTestCase): 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__.""" -- 2.47.3