]> granicus.if.org Git - python/commitdiff
Merged revisions 85459-85465 via svnmerge from
authorGeorg Brandl <georg@python.org>
Fri, 26 Nov 2010 07:29:03 +0000 (07:29 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 26 Nov 2010 07:29:03 +0000 (07:29 +0000)
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

index 3f4455a8c9904cd774297512e93aaa9e31c4eb03..26e8eab796f17926d42ebd7c2e44e71fc84f60dd 100644 (file)
@@ -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 "