[Python-checkins] r85462 - python/branches/py3k/Lib/test/test_xml_etree.py

georg.brandl python-checkins at python.org
Thu Oct 14 09:32:52 CEST 2010


Author: georg.brandl
Date: Thu Oct 14 09:32:52 2010
New Revision: 85462

Log:
#9964: fix running test_xml_etree under -OO.

Modified:
   python/branches/py3k/Lib/test/test_xml_etree.py

Modified: python/branches/py3k/Lib/test/test_xml_etree.py
==============================================================================
--- python/branches/py3k/Lib/test/test_xml_etree.py	(original)
+++ python/branches/py3k/Lib/test/test_xml_etree.py	Thu Oct 14 09:32:52 2010
@@ -1835,6 +1835,10 @@
     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 "


More information about the Python-checkins mailing list