Lines Matching refs:module

35     # However, doctest can't easily find all docstrings in the module (loading
58 self.module.heappush(heap, item)
62 item = self.module.heappop(heap)
71 self.assertRaises(TypeError, self.module.heappush, [])
73 self.assertRaises(TypeError, self.module.heappush, None, None)
74 self.assertRaises(TypeError, self.module.heappop, None)
88 self.module.heapify(heap)
91 self.assertRaises(TypeError, self.module.heapify, None)
97 self.module.heappush(heap, item)
99 self.module.heappop(heap)
107 yield self.module.heappop(heap)
119 self.module.heapify(heap)
122 self.module.heapreplace(heap, item)
125 self.assertRaises(TypeError, self.module.heapreplace, None)
126 self.assertRaises(TypeError, self.module.heapreplace, None, None)
127 self.assertRaises(IndexError, self.module.heapreplace, [], None)
132 self.module.heapify(heap)
134 self.module.heappushpop(heap, item)
136 self.assertEqual(self.module.heappushpop([], 'x'), 'x')
140 x = self.module.heappushpop(h, 10)
144 x = self.module.heappushpop(h, 10.0)
150 x = self.module.heappushpop(h, 9)
154 x = self.module.heappushpop(h, 11)
161 self.assertEqual(self.module._heappop_max(h), 3)
162 self.assertEqual(self.module._heappop_max(h), 2)
171 self.module.heapify(heap)
175 self.module.heappush(heap, item)
176 heap_sorted = [self.module.heappop(heap) for i in range(size)]
194 list(self.module.merge(*seqs, key=key, reverse=reverse)))
195 self.assertEqual(list(self.module.merge()), [])
200 self.assertEqual(list(self.module.merge([], [])), [])
201 self.assertEqual(list(self.module.merge([], [], key=lambda: 6)), [])
210 list(self.module.merge(iterable(), iterable()))
224 result = [i.pair for i in self.module.merge(*inputs)]
231 self.assertEqual(list(self.module.nsmallest(n, data)),
233 self.assertEqual(list(self.module.nsmallest(n, data, key=f)),
240 self.assertEqual(list(self.module.nlargest(n, data)),
242 self.assertEqual(list(self.module.nlargest(n, data, key=f)),
250 self.module.heapify(data)
251 return [self.module.heappop(data).x for i in range(len(data))]
269 module = py_heapq
274 module = c_heapq
381 for f in (self.module.heapify, self.module.heappop):
383 for f in (self.module.heappush, self.module.heapreplace,
384 self.module.nlargest, self.module.nsmallest):
388 for f in (self.module.heapify, self.module.heappop):
390 for f in (self.module.heappush, self.module.heapreplace):
392 for f in (self.module.nlargest, self.module.nsmallest):
397 for f in (self.module.heapify, self.module.heappop):
399 for f in (self.module.heappush, self.module.heapreplace):
401 for f in (self.module.nlargest, self.module.nsmallest):
405 for f in (self.module.heapify, self.module.heappop,
406 self.module.heappush, self.module.heapreplace,
407 self.module.nlargest, self.module.nsmallest):
411 for f in (self.module.nlargest, self.module.nsmallest):
427 self.module.heappush(heap, SideEffectLT(5, heap))
434 self.module.heappop(heap)
445 self.module.heappush(heap, EvilClass(0))
446 self.assertRaises(IndexError, self.module.heappushpop, heap, 1)
462 self.module.heappush(list1, h(0))
463 self.module.heappush(list2, g(0))
465 self.assertRaises((IndexError, RuntimeError), self.module.heappush, list1, g(1))
466 self.assertRaises((IndexError, RuntimeError), self.module.heappush, list2, h(1))
469 module = py_heapq
473 module = c_heapq