mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
merge from trunk
This commit is contained in:
parent
2d8dcdcb06
commit
f10a79aad4
40 changed files with 621 additions and 305 deletions
|
@ -196,6 +196,17 @@ class TestInsort(unittest.TestCase):
|
|||
def test_backcompatibility(self):
|
||||
self.assertEqual(self.module.insort, self.module.insort_right)
|
||||
|
||||
def test_listDerived(self):
|
||||
class List(list):
|
||||
data = []
|
||||
def insert(self, index, item):
|
||||
self.data.insert(index, item)
|
||||
|
||||
lst = List()
|
||||
self.module.insort_left(lst, 10)
|
||||
self.module.insort_right(lst, 5)
|
||||
self.assertEqual([5, 10], lst.data)
|
||||
|
||||
class TestInsortPython(TestInsort):
|
||||
module = py_bisect
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue