summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bisect.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-11 00:49:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-11 00:49:57 (GMT)
commitf10a79aad4e2fc62d2c3675e89f873b22b185e7b (patch)
tree06b042ca03a71663d26ad95949807d1bd2472bf4 /Lib/test/test_bisect.py
parent2d8dcdcb06005858e87eded012ceff10920445b7 (diff)
downloadcpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.zip
cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.gz
cpython-f10a79aad4e2fc62d2c3675e89f873b22b185e7b.tar.bz2
merge from trunk
Diffstat (limited to 'Lib/test/test_bisect.py')
-rw-r--r--Lib/test/test_bisect.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_bisect.py b/Lib/test/test_bisect.py
index 987f33c..df2f8b1 100644
--- a/Lib/test/test_bisect.py
+++ b/Lib/test/test_bisect.py
@@ -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