Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_trace.TestFuncs Class Reference

List of all members.

Public Member Functions

def setUp
def test_simple_caller
def test_loop_caller_importing
def test_inst_method_calling

Public Attributes

 tracer
 filemod

Detailed Description

White-box testing of funcs tracing

Definition at line 218 of file test_trace.py.


Member Function Documentation

Definition at line 220 of file test_trace.py.

00220 
00221     def setUp(self):
00222         self.tracer = Trace(count=0, trace=0, countfuncs=1)
00223         self.filemod = my_file_and_modname()

Here is the caller graph for this function:

Definition at line 245 of file test_trace.py.

00245 
00246     def test_inst_method_calling(self):
00247         obj = TracedClass(20)
00248         self.tracer.runfunc(obj.inst_method_calling, 1)
00249 
00250         expected = {
00251             self.filemod + ('TracedClass.inst_method_calling',): 1,
00252             self.filemod + ('TracedClass.inst_method_linear',): 1,
00253             self.filemod + ('traced_func_linear',): 1,
00254         }
00255         self.assertEqual(self.tracer.results().calledfuncs, expected)
00256 

Here is the call graph for this function:

Definition at line 233 of file test_trace.py.

00233 
00234     def test_loop_caller_importing(self):
00235         self.tracer.runfunc(traced_func_importing_caller, 1)
00236 
00237         expected = {
00238             self.filemod + ('traced_func_simple_caller',): 1,
00239             self.filemod + ('traced_func_linear',): 1,
00240             self.filemod + ('traced_func_importing_caller',): 1,
00241             self.filemod + ('traced_func_importing',): 1,
00242             (fix_ext_py(testmod.__file__), 'testmod', 'func'): 1,
00243         }
00244         self.assertEqual(self.tracer.results().calledfuncs, expected)

Here is the call graph for this function:

Definition at line 224 of file test_trace.py.

00224 
00225     def test_simple_caller(self):
00226         self.tracer.runfunc(traced_func_simple_caller, 1)
00227 
00228         expected = {
00229             self.filemod + ('traced_func_simple_caller',): 1,
00230             self.filemod + ('traced_func_linear',): 1,
00231         }
00232         self.assertEqual(self.tracer.results().calledfuncs, expected)

Here is the call graph for this function:


Member Data Documentation

Definition at line 222 of file test_trace.py.

Definition at line 221 of file test_trace.py.


The documentation for this class was generated from the following file: