Ejemplo n.º 1
0
 def some_inner(k, v):
     a = 1
     b = 2
     return traceback.StackSummary.extract(traceback.walk_stack(None),
                                           capture_locals=True,
                                           limit=1)
Ejemplo n.º 2
0
 def test_extract_stack(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None))
     self.assertIsInstance(s, traceback.StackSummary)
Ejemplo n.º 3
0
 def test_extract_stack_limit(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None), limit=5)
     self.assertEqual(len(s), 5)
Ejemplo n.º 4
0
 def test_walk_stack(self):
     s = list(traceback.walk_stack(None))
     self.assertGreater(len(s), 10)
Ejemplo n.º 5
0
 def some_inner(k, v):
     a = 1
     b = 2
     return traceback.StackSummary.extract(
         traceback.walk_stack(None), capture_locals=True, limit=1)
Ejemplo n.º 6
0
 def test_extract_stack_limit(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None), limit=5)
     self.assertEqual(len(s), 5)
Ejemplo n.º 7
0
 def test_extract_stack(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None))
     self.assertIsInstance(s, traceback.StackSummary)
Ejemplo n.º 8
0
 def test_walk_stack(self):
     s = list(traceback.walk_stack(None))
     self.assertGreater(len(s), 10)