mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
Tighten up some warning filters, and break some dependencies on the
order in which the tests are normally run.
This commit is contained in:
parent
50ac30ee01
commit
d392506c43
9 changed files with 34 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue