From 3a88060a676b2507d216ea4877c1d81a6ea728d1 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 (GH-149411) (cherry picked from commit bad9296fb0424bc480fa0ecfd2d60f73c33358f5) Co-authored-by: sobolevn --- 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 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__."""