summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-11-26 07:29:03 (GMT)
committerGeorg Brandl <georg@python.org>2010-11-26 07:29:03 (GMT)
commitd8d884947bf4d592d0e0378ad9637175620292c6 (patch)
treead68f385fc453c928075049fa02a4ac96eb868b5
parentb4b89aae0da33502ef73327ae9910fe8785cc106 (diff)
downloadcpython-d8d884947bf4d592d0e0378ad9637175620292c6.zip
cpython-d8d884947bf4d592d0e0378ad9637175620292c6.tar.gz
cpython-d8d884947bf4d592d0e0378ad9637175620292c6.tar.bz2
Merged revisions 85459-85465 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85459 | georg.brandl | 2010-10-14 09:23:01 +0200 (Do, 14 Okt 2010) | 1 line #9964: Fix failure of test_dis under -OO. ........ r85460 | georg.brandl | 2010-10-14 09:24:28 +0200 (Do, 14 Okt 2010) | 1 line #9964: fix running test_import under -O or -OO. ........ r85461 | georg.brandl | 2010-10-14 09:29:08 +0200 (Do, 14 Okt 2010) | 1 line #9964: fix lib2to3 fixer fix_operator when running under -OO. ........ r85462 | georg.brandl | 2010-10-14 09:32:52 +0200 (Do, 14 Okt 2010) | 1 line #9964: fix running test_xml_etree under -OO. ........ r85463 | georg.brandl | 2010-10-14 09:34:56 +0200 (Do, 14 Okt 2010) | 1 line Better check for "any optimize option given". ........ r85464 | georg.brandl | 2010-10-14 09:42:27 +0200 (Do, 14 Okt 2010) | 1 line #9964: fix running test_compileall under -O and -OO. ........ r85465 | georg.brandl | 2010-10-14 10:08:56 +0200 (Do, 14 Okt 2010) | 1 line #9964: fix running test_cmd_line_script under -O and -OO. ........
-rw-r--r--Lib/test/test_xml_etree.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 3f4455a..26e8eab 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1829,6 +1829,10 @@ class CleanContext(object):
checkwarnings = None
def __init__(self, quiet=False):
+ if sys.flags.optimize >= 2:
+ # under -OO, doctests cannot be run and therefore not all warnings
+ # will be emitted
+ quiet = True
deprecations = (
# Search behaviour is broken if search path starts with "/".
("This search is broken in 1.3 and earlier, and will be fixed "