def test_get_frame_helper(self):
        # non-None argument passed is returned unchanged.
        self.assertEqual(self, stacktrace._get_frame(self))
        # Otherwise get the frame two-up.

        def run_get_frame():
            """run _get_frame from inside another function."""
            return stacktrace._get_frame(None)
        self.assertEqual(sys._getframe(), run_get_frame())
Beispiel #2
0
    def test_get_frame_helper(self):
        # non-None argument passed is returned unchanged.
        self.assertEqual(self, stacktrace._get_frame(self))

        # Otherwise get the frame two-up.

        def run_get_frame():
            """run _get_frame from inside another function."""
            return stacktrace._get_frame(None)

        self.assertEqual(sys._getframe(), run_get_frame())
 def run_get_frame():
     """run _get_frame from inside another function."""
     return stacktrace._get_frame(None)
Beispiel #4
0
 def run_get_frame():
     """run _get_frame from inside another function."""
     return stacktrace._get_frame(None)