summaryrefslogtreecommitdiff
path: root/Lib/test/test_py3kwarn.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r--Lib/test/test_py3kwarn.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index c695daacf4..1e368d5a6b 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -126,6 +126,16 @@ class TestPy3KWarnings(unittest.TestCase):
w.reset()
self.assertWarning(meth >= func, w, expected)
+ def test_frame_attributes(self):
+ template = "%s has been removed in 3.x"
+ f = sys._getframe(0)
+ for attr in ("f_exc_traceback", "f_exc_value", "f_exc_type"):
+ expected = template % attr
+ with check_warnings() as w:
+ self.assertWarning(getattr(f, attr), w, expected)
+ w.reset()
+ self.assertWarning(setattr(f, attr, None), w, expected)
+
def test_sort_cmp_arg(self):
expected = "the cmp argument is not supported in 3.x"
lst = range(5)