Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_heapq Namespace Reference

Classes

class  TestModules
class  TestHeap
class  TestHeapPython
class  TestHeapC
class  LenOnly
class  GetOnly
class  CmpErr
class  G
class  I
class  Ig
class  X
class  N
class  E
class  S
class  TestErrorHandling
class  TestErrorHandlingPython
class  TestErrorHandlingC

Functions

def R
def L
def test_main

Variables

tuple py_heapq = support.import_fresh_module('heapq', blocked=['_heapq'])
tuple c_heapq = support.import_fresh_module('heapq', fresh=['_heapq'])
list func_names

Detailed Description

Unittests for heapq.

Function Documentation

def test.test_heapq.L (   seqn)

Definition at line 317 of file test_heapq.py.

00317 
00318 def L(seqn):
00319     'Test multiple tiers of iterators'
00320     return chain(map(lambda x:x, R(Ig(G(seqn)))))
00321 

Here is the call graph for this function:

def test.test_heapq.R (   seqn)

Definition at line 244 of file test_heapq.py.

00244 
00245 def R(seqn):
00246     'Regular generator'
00247     for i in seqn:
00248         yield i

Here is the caller graph for this function:

def test.test_heapq.test_main (   verbose = None)

Definition at line 385 of file test_heapq.py.

00385 
00386 def test_main(verbose=None):
00387     test_classes = [TestModules, TestHeapPython, TestHeapC,
00388                     TestErrorHandlingPython, TestErrorHandlingC]
00389     support.run_unittest(*test_classes)
00390 
00391     # verify reference counting
00392     if verbose and hasattr(sys, "gettotalrefcount"):
00393         import gc
00394         counts = [None] * 5
00395         for i in range(len(counts)):
00396             support.run_unittest(*test_classes)
00397             gc.collect()
00398             counts[i] = sys.gettotalrefcount()
00399         print(counts)


Variable Documentation

tuple test.test_heapq.c_heapq = support.import_fresh_module('heapq', fresh=['_heapq'])

Definition at line 10 of file test_heapq.py.

Initial value:
00001 ['heapify', 'heappop', 'heappush', 'heappushpop',
00002               'heapreplace', '_nlargest', '_nsmallest']

Definition at line 14 of file test_heapq.py.

tuple test.test_heapq.py_heapq = support.import_fresh_module('heapq', blocked=['_heapq'])

Definition at line 9 of file test_heapq.py.