Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ea72e9 commit df4d53aCopy full SHA for df4d53a
1 file changed
Lib/test/test_bool.py
@@ -369,6 +369,13 @@ def f(x):
369
f(x)
370
self.assertGreaterEqual(x.count, 1)
371
372
+ def test_bool_new(self):
373
+ self.assertIs(bool.__new__(bool), False)
374
+ self.assertIs(bool.__new__(bool, 1), True)
375
+ self.assertIs(bool.__new__(bool, 0), False)
376
+ self.assertIs(bool.__new__(bool, False), False)
377
+ self.assertIs(bool.__new__(bool, True), True)
378
+
379
380
if __name__ == "__main__":
381
unittest.main()
0 commit comments