Skip to content

Commit dd41f93

Browse files
[3.14] gh-149410: Test that typing.NoDefault is final (GH-149411) (#149419)
gh-149410: Test that `typing.NoDefault` is final (GH-149411) (cherry picked from commit bad9296) Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent 37803c4 commit dd41f93

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10859,6 +10859,10 @@ def test_no_attributes(self):
1085910859
with self.assertRaises(AttributeError):
1086010860
type(NoDefault).foo
1086110861

10862+
def test_no_subclassing(self):
10863+
with self.assertRaises(TypeError):
10864+
class Test(type(NoDefault)): ...
10865+
1086210866

1086310867
class AllTests(BaseTestCase):
1086410868
"""Tests for __all__."""

0 commit comments

Comments
 (0)