From d8d884947bf4d592d0e0378ad9637175620292c6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 26 Nov 2010 07:29:03 +0000 Subject: [PATCH] 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. ........ --- Lib/test/test_xml_etree.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 3f4455a8c9..26e8eab796 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 " -- 2.50.1