mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
#2358: add py3k warning to sys.exc_clear().
This commit is contained in:
parent
77354cf5ef
commit
5a44424c5e
3 changed files with 16 additions and 1 deletions
|
@ -94,6 +94,11 @@ class TestPy3KWarnings(unittest.TestCase):
|
|||
with catch_warning() as w:
|
||||
self.assertWarning(sorted(lst, cmp), w, expected)
|
||||
|
||||
def test_sys_exc_clear(self):
|
||||
expected = 'sys.exc_clear() not supported in 3.x. Use except clauses.'
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(sys.exc_clear(), w, expected)
|
||||
|
||||
def test_main():
|
||||
run_unittest(TestPy3KWarnings)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue