diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index 4b32aad2419f4a..08a046607d5b1c 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): + assert bool.__new__(bool) is False + assert bool.__new__(bool, 1) is True + assert bool.__new__(bool, 0) is False + assert bool.__new__(bool, False) is False + assert bool.__new__(bool, True) is True + if __name__ == "__main__": unittest.main()