MCPcopy Index your code
hub / github.com/python/cpython / test_insert

Method test_insert

Lib/test/test_deque.py:303–311  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

301 i = d.index("Hello world", 0, 4)
302
303 def test_insert(self):
304 # Test to make sure insert behaves like lists
305 elements = 'ABCDEFGHI'
306 for i in range(-5 - len(elements)*2, 5 + len(elements) * 2):
307 d = deque('ABCDEFGHI')
308 s = list('ABCDEFGHI')
309 d.insert(i, 'Z')
310 s.insert(i, 'Z')
311 self.assertEqual(list(d), s)
312
313 def test_insert_bug_26194(self):
314 data = 'ABC'

Callers

nothing calls this directly

Calls 3

listClass · 0.85
insertMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected