diff options
| author | Georg Brandl <georg@python.org> | 2010-10-14 07:32:52 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-10-14 07:32:52 (GMT) |
| commit | f99a15c3774edabcab04e357008827528440dcf2 (patch) | |
| tree | dd3207badd3804e475cedf65e2438d76fb4aee6a /Lib/test/test_xml_etree.py | |
| parent | cbeb9fa6177ce88fef04904295aa2defc9a7a467 (diff) | |
| download | cpython-f99a15c3774edabcab04e357008827528440dcf2.zip cpython-f99a15c3774edabcab04e357008827528440dcf2.tar.gz cpython-f99a15c3774edabcab04e357008827528440dcf2.tar.bz2 | |
#9964: fix running test_xml_etree under -OO.
Diffstat (limited to 'Lib/test/test_xml_etree.py')
| -rw-r--r-- | Lib/test/test_xml_etree.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 39997cc..8079b84 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -1835,6 +1835,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 " |
