Skip to content

Commit 3b97088

Browse files
committed
pythongh-94808: Add coverage for boolobject.c:bool_new
1 parent 0c66074 commit 3b97088

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_bool.py

+7
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,13 @@ def f(x):
369369
f(x)
370370
self.assertGreaterEqual(x.count, 1)
371371

372+
def test_bool_new(self):
373+
assert bool.__new__(bool) is False
374+
assert bool.__new__(bool, 1) is True
375+
assert bool.__new__(bool, 0) is False
376+
assert bool.__new__(bool, False) is False
377+
assert bool.__new__(bool, True) is True
378+
372379

373380
if __name__ == "__main__":
374381
unittest.main()

0 commit comments

Comments
 (0)