Skip to content

Commit 18f6a65

Browse files
authored
Merge pull request #4631 from dalinaum/test_bool
Update test/test_bool from cpython 3.11.2
2 parents 4d464cc + 3fd46e8 commit 18f6a65

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_bool.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ def f(x):
371371
f(x)
372372
self.assertGreaterEqual(x.count, 1)
373373

374+
def test_bool_new(self):
375+
self.assertIs(bool.__new__(bool), False)
376+
self.assertIs(bool.__new__(bool, 1), True)
377+
self.assertIs(bool.__new__(bool, 0), False)
378+
self.assertIs(bool.__new__(bool, False), False)
379+
self.assertIs(bool.__new__(bool, True), True)
380+
374381

375382
if __name__ == "__main__":
376383
unittest.main()

0 commit comments

Comments
 (0)