diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index 4b32aad2419f4a..f46f21da8da351 100644 --- a/Lib/test/test_bool.py +++ b/Lib/test/test_bool.py @@ -369,6 +369,13 @@ def f(x): 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()