Commit ca01a768 authored by Benjamin Peterson's avatar Benjamin Peterson

don't expect warnings from doctests if they can't run

parent d7d9a442
...@@ -2673,7 +2673,9 @@ def test_main(): ...@@ -2673,7 +2673,9 @@ def test_main():
from test import test_doctest from test import test_doctest
# Ignore all warnings about the use of class Tester in this module. # Ignore all warnings about the use of class Tester in this module.
deprecations = [("class Tester is deprecated", DeprecationWarning)] deprecations = []
if __debug__:
deprecations.append(("class Tester is deprecated", DeprecationWarning))
if sys.py3kwarning: if sys.py3kwarning:
deprecations += [("backquote not supported", SyntaxWarning), deprecations += [("backquote not supported", SyntaxWarning),
("execfile.. not supported", DeprecationWarning)] ("execfile.. not supported", DeprecationWarning)]
......
...@@ -179,9 +179,10 @@ class ZipSupportTests(ImportHooksBaseTestCase): ...@@ -179,9 +179,10 @@ class ZipSupportTests(ImportHooksBaseTestCase):
test_zipped_doctest.test_unittest_reportflags, test_zipped_doctest.test_unittest_reportflags,
] ]
# Needed for test_DocTestParser and test_debug # Needed for test_DocTestParser and test_debug
deprecations = [ deprecations = []
if __debug__:
# Ignore all warnings about the use of class Tester in this module. # Ignore all warnings about the use of class Tester in this module.
("class Tester is deprecated", DeprecationWarning)] depcreations.append(("class Tester is deprecated", DeprecationWarning))
if sys.py3kwarning: if sys.py3kwarning:
deprecations += [ deprecations += [
("backquote not supported", SyntaxWarning), ("backquote not supported", SyntaxWarning),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment