Skip to content

Commit

Permalink
gh-94808: Add coverage for boolobject.c:bool_new (GH-94859) (GH-94883)
Browse files Browse the repository at this point in the history
`bool_new` had no coverage.

Automerge-Triggered-By: GH:brandtbucher
(cherry picked from commit df4d53a)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
  • Loading branch information
miss-islington and mdboom authored Jul 15, 2022
1 parent e55f60d commit 8dc4de3
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):
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()

0 comments on commit 8dc4de3

Please sign in to comment.