Skip to content

Commit

Permalink
pythongh-94808: Add coverage for boolobject.c:bool_new
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jul 14, 2022
1 parent 0c66074 commit 3b97088
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/test/test_bool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 3b97088

Please sign in to comment.