diff options
Diffstat (limited to 'Lib/test/test_bisect.py')
-rw-r--r-- | Lib/test/test_bisect.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_bisect.py b/Lib/test/test_bisect.py index 87448b3..f6e24a6 100644 --- a/Lib/test/test_bisect.py +++ b/Lib/test/test_bisect.py @@ -130,6 +130,16 @@ class TestBisect(unittest.TestCase): def test_backcompatibility(self): self.assertEqual(bisect, bisect_right) + def test_keyword_args(self): + data = [10, 20, 30, 40, 50] + self.assertEqual(bisect_left(a=data, x=25, lo=1, hi=3), 2) + self.assertEqual(bisect_right(a=data, x=25, lo=1, hi=3), 2) + self.assertEqual(bisect(a=data, x=25, lo=1, hi=3), 2) + insort_left(a=data, x=25, lo=1, hi=3) + insort_right(a=data, x=25, lo=1, hi=3) + insort(a=data, x=25, lo=1, hi=3) + self.assertEqual(data, [10, 20, 25, 25, 25, 30, 40, 50]) + #============================================================================== class TestInsort(unittest.TestCase): |