Update test_bisect.py from 3.14.4 (#7609)

This commit is contained in:
Shahar Naveh authored and GitHub committed 2026-04-15 14:17:48 +09:00
1 parent e195d742af
commit a02fae38cb
1 file changed
+3 -3
+3 -3
View File
@@ -391,9 +391,9 @@ class TestErrorHandlingC(TestErrorHandling, unittest.TestCase):
class TestDocExample:
def test_grades(self):
def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):
i = self.module.bisect(breakpoints, score)
return grades[i]
def grade(score):
i = self.module.bisect([60, 70, 80, 90], score)
return "FDCBA"[i]
result = [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
self.assertEqual(result, ['F', 'A', 'C', 'C', 'B', 'A', 'A'])