also make NotImplementedType callable

This commit is contained in:
Benjamin Peterson 2011-07-29 18:27:44 -05:00
parent d83be998fc
commit 18d7d7a217
3 changed files with 38 additions and 3 deletions

View file

@ -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)