Back to index

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

List of all members.

Public Member Functions

def setUp
def test_loop_caller_importing

Public Attributes

 tracer
 filemod

Detailed Description

White-box testing of callers tracing

Definition at line 257 of file test_trace.py.


Member Function Documentation

Definition at line 259 of file test_trace.py.

00259 
00260     def setUp(self):
00261         self.tracer = Trace(count=0, trace=0, countcallers=1)
00262         self.filemod = my_file_and_modname()

Here is the caller graph for this function:

Definition at line 263 of file test_trace.py.

00263 
00264     def test_loop_caller_importing(self):
00265         self.tracer.runfunc(traced_func_importing_caller, 1)
00266 
00267         expected = {
00268             ((os.path.splitext(trace.__file__)[0] + '.py', 'trace', 'Trace.runfunc'),
00269                 (self.filemod + ('traced_func_importing_caller',))): 1,
00270             ((self.filemod + ('traced_func_simple_caller',)),
00271                 (self.filemod + ('traced_func_linear',))): 1,
00272             ((self.filemod + ('traced_func_importing_caller',)),
00273                 (self.filemod + ('traced_func_simple_caller',))): 1,
00274             ((self.filemod + ('traced_func_importing_caller',)),
00275                 (self.filemod + ('traced_func_importing',))): 1,
00276             ((self.filemod + ('traced_func_importing',)),
00277                 (fix_ext_py(testmod.__file__), 'testmod', 'func')): 1,
00278         }
00279         self.assertEqual(self.tracer.results().callers, expected)
00280 
00281 
# Created separately for issue #3821

Here is the call graph for this function:


Member Data Documentation

Definition at line 261 of file test_trace.py.

Definition at line 260 of file test_trace.py.


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