Skip to content

Commit bad9296

Browse files
authored
gh-149410: Test that typing.NoDefault is final (#149411)
1 parent 70bd1c2 commit bad9296

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
@@ -11131,6 +11131,10 @@ def test_no_attributes(self):
1113111131
with self.assertRaises(AttributeError):
1113211132
type(NoDefault).foo
1113311133

11134+
def test_no_subclassing(self):
11135+
with self.assertRaises(TypeError):
11136+
class Test(type(NoDefault)): ...
11137+
1113411138

1113511139
class AllTests(BaseTestCase):
1113611140
"""Tests for __all__."""

0 commit comments

Comments
 (0)