Пример #1
0
 def test_hierarchy_flat(self):
     ''' Testing basic case. '''        
     init_progress_tracking(lambda stack:None) #@UnusedVariable
     self.assert_stack_len(0)
     progress('A', (0, 2))
     self.assert_stack_len(1)
     progress('A', (1, 2))
     self.assert_stack_len(1)
Пример #2
0
 def test_hierarchy_flat2(self):
     data = {}
     def mystack(x):     
         data['stack'] = x
     init_progress_tracking(mystack)
     self.assert_stack_len(0)
     progress('A', (0, 2))
     self.assert_stack_len(1) 
     progress('B', (0, 2))
     self.assert_stack_len(2) 
     progress('B', (1, 2))
     self.assert_stack_len(2)
     progress('A', (1, 2))
     self.assert_stack_len(1) 
Пример #3
0
 def setUp(self):
     init_progress_tracking(self.stack_update)