From c52a2337a567f2e0a895c475542b07c5a0d2fe25 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 5 May 2026 15:11:32 +0300 Subject: [PATCH] gh-149410: Test that `typing.NoDefault` is final --- 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 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__."""