Home | History | Annotate | Download | only in test

Lines Matching defs:module

29     module = None
39 self.module.heappush(heap, item)
43 item = self.module.heappop(heap)
52 self.assertRaises(TypeError, self.module.heappush, [])
54 self.assertRaises(TypeError, self.module.heappush, None, None)
55 self.assertRaises(TypeError, self.module.heappop, None)
69 self.module.heapify(heap)
72 self.assertRaises(TypeError, self.module.heapify, None)
78 self.module.heappush(heap, item)
80 self.module.heappop(heap)
88 yield self.module.heappop(heap)
100 self.module.heapify(heap)
103 self.module.heapreplace(heap, item)
106 self.assertRaises(TypeError, self.module.heapreplace, None)
107 self.assertRaises(TypeError, self.module.heapreplace, None, None)
108 self.assertRaises(IndexError, self.module.heapreplace, [], None)
113 self.module.heapify(heap)
115 self.module.heappushpop(heap, item)
117 self.assertEqual(self.module.heappushpop([], 'x'), 'x')
121 x = self.module.heappushpop(h, 10)
125 x = self.module.heappushpop(h, 10.0)
131 x = self.module.heappushpop(h, 9)
135 x = self.module.heappushpop(h, 11)
145 self.module.heapify(heap)
149 self.module.heappush(heap, item)
150 heap_sorted = [self.module.heappop(heap) for i in range(size)]
158 self.assertEqual(sorted(chain(*inputs)), list(self.module.merge(*inputs)))
159 self.assertEqual(list(self.module.merge()), [])
173 result = [i.pair for i in self.module.merge(*inputs)]
180 self.assertEqual(self.module.nsmallest(n, data), sorted(data)[:n])
181 self.assertEqual(self.module.nsmallest(n, data, key=f),
188 self.assertEqual(self.module.nlargest(n, data),
190 self.assertEqual(self.module.nlargest(n, data, key=f),
197 self.module.heapify(data)
198 return [self.module.heappop(data).x for i in range(len(data))]
216 module = py_heapq
221 module = c_heapq
329 module = None
332 for f in (self.module.heapify, self.module.heappop):
334 for f in (self.module.heappush, self.module.heapreplace,
335 self.module.nlargest, self.module.nsmallest):
339 for f in (self.module.heapify, self.module.heappop):
341 for f in (self.module.heappush, self.module.heapreplace):
343 for f in (self.module.nlargest, self.module.nsmallest):
348 for f in (self.module.heapify, self.module.heappop):
350 for f in (self.module.heappush, self.module.heapreplace):
352 for f in (self.module.nlargest, self.module.nsmallest):
356 for f in (self.module.heapify, self.module.heappop,
357 self.module.heappush, self.module.heapreplace,
358 self.module.nlargest, self.module.nsmallest):
362 for f in (self.module.nlargest, self.module.nsmallest):
381 self.module.heappush(heap, SideEffectLT(5, heap))
388 self.module.heappop(heap)
392 module = py_heapq
397 module = c_heapq