summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-21 20:11:46 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-21 20:11:46 (GMT)
commit5a44424c5e6b9533b12773fadeaf436903ca855e (patch)
tree798911139fbccc6a8574ed0e13388affea097082 /Lib
parent77354cf5ef9644121a28041216591762628d8b65 (diff)
downloadcpython-5a44424c5e6b9533b12773fadeaf436903ca855e.zip
cpython-5a44424c5e6b9533b12773fadeaf436903ca855e.tar.gz
cpython-5a44424c5e6b9533b12773fadeaf436903ca855e.tar.bz2
#2358: add py3k warning to sys.exc_clear().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_py3kwarn.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 2b54ee1..aaa1623 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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)