mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
gh-94808: Add coverage for boolobject.c:bool_new (GH-94859)
`bool_new` had no coverage. Automerge-Triggered-By: GH:brandtbucher
This commit is contained in:
parent
9ea72e9d8d
commit
df4d53a09a
@ -369,6 +369,13 @@ class BoolTest(unittest.TestCase):
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user