Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18f6a65

Browse filesBrowse 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
Copy full SHA for 18f6a65

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎Lib/test/test_bool.py

Copy file name to clipboardExpand all lines: Lib/test/test_bool.py
+7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.