summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-16 01:27:44 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-16 01:27:44 (GMT)
commitd392506c43a48d570a09a15e7f1889873fe17d6c (patch)
tree83ceeade55a3a7b201f7bcafe3a0804b85ad3c3c /Lib/test/test_exceptions.py
parent50ac30ee0190ea2dd4ede87d63d6ebba23bd3a11 (diff)
downloadcpython-d392506c43a48d570a09a15e7f1889873fe17d6c.zip
cpython-d392506c43a48d570a09a15e7f1889873fe17d6c.tar.gz
cpython-d392506c43a48d570a09a15e7f1889873fe17d6c.tar.bz2
Tighten up some warning filters, and break some dependencies on the
order in which the tests are normally run.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index e03abfa..c2fbec6 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -5,8 +5,6 @@ from types import ClassType
import warnings
import sys, traceback
-warnings.filterwarnings("error", "", OverflowWarning, __name__)
-
print '5. Built-in exceptions'
# XXX This is not really enough, each *operation* should be tested!
@@ -86,6 +84,12 @@ try: x = undefined_variable
except NameError: pass
r(OverflowError)
+# XXX
+# Obscure: this test relies on int+int raising OverflowError if the
+# ints are big enough. But ints no longer do that by default. This
+# test will have to go away someday. For now, we can convert the
+# transitional OverflowWarning into an error.
+warnings.filterwarnings("error", "", OverflowWarning, __name__)
x = 1
try:
while 1: x = x+x