From 90896a384d1e31c18c537f879f650dc93ee72840 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 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__."""