Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a268b9

Browse files
committed
#17255: merge with 3.3.
2 parents 920007a + 600b711 commit 8a268b9

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_builtin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def test_all(self):
180180
self.assertRaises(TypeError, all) # No args
181181
self.assertRaises(TypeError, all, [2, 4, 6], []) # Too many args
182182
self.assertEqual(all([]), True) # Empty iterator
183+
self.assertEqual(all([0, TestFailingBool()]), False)# Short-circuit
183184
S = [50, 60]
184185
self.assertEqual(all(x > 42 for x in S), True)
185186
S = [50, 40, 60]
@@ -194,6 +195,7 @@ def test_any(self):
194195
self.assertRaises(TypeError, any) # No args
195196
self.assertRaises(TypeError, any, [2, 4, 6], []) # Too many args
196197
self.assertEqual(any([]), False) # Empty iterator
198+
self.assertEqual(any([1, TestFailingBool()]), True) # Short-circuit
197199
S = [40, 60, 30]
198200
self.assertEqual(any(x > 42 for x in S), True)
199201
S = [10, 20, 30]

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ Johannes Gijsbers
426426
Michael Gilfix
427427
Yannick Gingras
428428
Matt Giuca
429+
Wim Glenn
429430
Michael Goderbauer
430431
Christoph Gohlke
431432
Tim Golden

0 commit comments

Comments
 (0)