summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_bool.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py
index 4b32aad..f46f21d 100644
--- a/Lib/test/test_bool.py
+++ b/Lib/test/test_bool.py
@@ -369,6 +369,13 @@ class BoolTest(unittest.TestCase):
f(x)
self.assertGreaterEqual(x.count, 1)
+ def test_bool_new(self):
+ self.assertIs(bool.__new__(bool), False)
+ self.assertIs(bool.__new__(bool, 1), True)
+ self.assertIs(bool.__new__(bool, 0), False)
+ self.assertIs(bool.__new__(bool, False), False)
+ self.assertIs(bool.__new__(bool, True), True)
+
if __name__ == "__main__":
unittest.main()