mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
also make NotImplementedType callable
This commit is contained in:
parent
d83be998fc
commit
18d7d7a217
3 changed files with 38 additions and 3 deletions
|
|
@ -1344,7 +1344,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertRaises(TypeError, x.translate, b"1"*256, 1)
|
||||
|
||||
def test_construct_singletons(self):
|
||||
for const in None, Ellipsis:
|
||||
for const in None, Ellipsis, NotImplemented:
|
||||
tp = type(const)
|
||||
self.assertIs(tp(), const)
|
||||
self.assertRaises(TypeError, tp, 1, 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue