Back to index

python3.2  3.2.2
Classes | Functions
test.test_peepholer Namespace Reference

Classes

class  TestTranforms
class  TestBuglets

Functions

def disassemble
def dis_single
def test_main

Function Documentation

Definition at line 17 of file test_peepholer.py.

00017 
00018 def dis_single(line):
00019     return disassemble(compile(line, '', 'single'))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 7 of file test_peepholer.py.

00007 
00008 def disassemble(func):
00009     f = StringIO()
00010     tmp = sys.stdout
00011     sys.stdout = f
00012     dis.dis(func)
00013     sys.stdout = tmp
00014     result = f.getvalue()
00015     f.close()
00016     return result

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_peepholer.test_main (   verbose = None)

Definition at line 301 of file test_peepholer.py.

00301 
00302 def test_main(verbose=None):
00303     import sys
00304     from test import support
00305     test_classes = (TestTranforms, TestBuglets)
00306     support.run_unittest(*test_classes)
00307 
00308     # verify reference counting
00309     if verbose and hasattr(sys, "gettotalrefcount"):
00310         import gc
00311         counts = [None] * 5
00312         for i in range(len(counts)):
00313             support.run_unittest(*test_classes)
00314             gc.collect()
00315             counts[i] = sys.gettotalrefcount()
00316         print(counts)