diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-09-09 11:42:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-09-09 11:42:57 (GMT) |
commit | 93ed82048f3073bfd972a8614adecd2930b29c1f (patch) | |
tree | c8ae0bc33a79326833a7d72cc9884af42b2ac695 /Lib | |
parent | 8246968b1222b25352d1aade43336686dc388221 (diff) | |
download | cpython-93ed82048f3073bfd972a8614adecd2930b29c1f.zip cpython-93ed82048f3073bfd972a8614adecd2930b29c1f.tar.gz cpython-93ed82048f3073bfd972a8614adecd2930b29c1f.tar.bz2 |
revert unintended changes
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_traceback.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index d7dcbac..b29869a 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -21,50 +21,6 @@ class TracebackCases(unittest.TestCase): else: raise ValueError, "call did not raise exception" - def test_tb_next(self): - def f(): - raise Exception - def g(): - f() - try: - g() - except Exception: - tb = sys.exc_info()[2] - self.assertEqual(tb.tb_frame.f_code.co_name, "test_tb_next") - g_tb = tb.tb_next - self.assertEqual(g_tb.tb_frame.f_code.co_name, "g") - f_tb = g_tb.tb_next - self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") - self.assertIsNone(f_tb.tb_next) - tb.tb_next = None - self.assertIsNone(tb.tb_next) - self.assertRaises(ValueError, setattr, f_tb, "tb_next", g_tb) - self.assertRaises(TypeError, setattr, tb, "tb_next", 4) - g_tb.tb_next = None - f_tb.tb_next = g_tb - self.assertIs(f_tb.tb_next, g_tb) - self.assertRaises(ValueError, setattr, f_tb, "tb_next", f_tb) - self.assertRaises(TypeError, delattr, tb, "tb_next") - - def test_tb_frame(self): - def f(): - x = 2 - raise Exception - try: - f() - except Exception: - tb = sys.exc_info()[2] - self.assertIs(sys._getframe(), tb.tb_frame) - f_tb = tb.tb_next - self.assertEqual(f_tb.tb_frame.f_code.co_name, "f") - self.assertEqual(f_tb.tb_frame.f_locals["x"], 2) - f_tb.tb_frame = None - self.assertIsNone(f_tb.tb_frame) - self.assertRaises(TypeError, setattr, t_tb, "tb_frame", 4) - self.assertRaises(TypeError, delattr, t_tb, "tb_frame") - t_tb.tb_frame = sys._getframe() - self.assertIs(t_tb.tb_frame, tb.tb_frame) - def syntax_error_with_caret(self): compile("def fact(x):\n\treturn x!\n", "?", "exec") |