Skip to content

Commit 99c9b85

Browse files
[3.13] gh-149410: Test that typing.NoDefault is final (GH-149411) (#149420)
gh-149410: Test that `typing.NoDefault` is final (GH-149411) (cherry picked from commit bad9296) Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent 67c47ce commit 99c9b85

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
@@ -10570,6 +10570,10 @@ def test_no_attributes(self):
1057010570
with self.assertRaises(AttributeError):
1057110571
type(NoDefault).foo
1057210572

10573+
def test_no_subclassing(self):
10574+
with self.assertRaises(TypeError):
10575+
class Test(type(NoDefault)): ...
10576+
1057310577

1057410578
class AllTests(BaseTestCase):
1057510579
"""Tests for __all__."""

0 commit comments

Comments
 (0)