mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
add py3k warnings to frame.f_exc_*
This commit is contained in:
parent
f281ff81a4
commit
f09925da67
2 changed files with 45 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue