Skip to content

Commit 8108b6a

Browse files
authored
Update test_bisect.py from 3.14.4 (#7609)
1 parent 63a1c0e commit 8108b6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_bisect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ class TestErrorHandlingC(TestErrorHandling, unittest.TestCase):
391391

392392
class TestDocExample:
393393
def test_grades(self):
394-
def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):
395-
i = self.module.bisect(breakpoints, score)
396-
return grades[i]
394+
def grade(score):
395+
i = self.module.bisect([60, 70, 80, 90], score)
396+
return "FDCBA"[i]
397397

398398
result = [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
399399
self.assertEqual(result, ['F', 'A', 'C', 'C', 'B', 'A', 'A'])

0 commit comments

Comments
 (0)