We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1871a16 commit 3fd46e8Copy full SHA for 3fd46e8
Lib/test/test_bool.py
@@ -371,6 +371,13 @@ def f(x):
371
f(x)
372
self.assertGreaterEqual(x.count, 1)
373
374
+ def test_bool_new(self):
375
+ self.assertIs(bool.__new__(bool), False)
376
+ self.assertIs(bool.__new__(bool, 1), True)
377
+ self.assertIs(bool.__new__(bool, 0), False)
378
+ self.assertIs(bool.__new__(bool, False), False)
379
+ self.assertIs(bool.__new__(bool, True), True)
380
+
381
382
if __name__ == "__main__":
383
unittest.main()
0 commit comments