Esempio 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)
Esempio n. 2
0
 def test_extract_stack(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None))
     self.assertIsInstance(s, traceback.StackSummary)
Esempio n. 3
0
 def test_extract_stack_limit(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None), limit=5)
     self.assertEqual(len(s), 5)
Esempio n. 4
0
 def test_walk_stack(self):
     s = list(traceback.walk_stack(None))
     self.assertGreater(len(s), 10)
 def some_inner(k, v):
     a = 1
     b = 2
     return traceback.StackSummary.extract(
         traceback.walk_stack(None), capture_locals=True, limit=1)
 def test_extract_stack_limit(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None), limit=5)
     self.assertEqual(len(s), 5)
 def test_extract_stack(self):
     s = traceback.StackSummary.extract(traceback.walk_stack(None))
     self.assertIsInstance(s, traceback.StackSummary)
 def test_walk_stack(self):
     s = list(traceback.walk_stack(None))
     self.assertGreater(len(s), 10)