don't expect warnings from doctests if they can't run
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 8c87bee..45057c8 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -2673,7 +2673,9 @@
from test import test_doctest
# 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:
deprecations += [("backquote not supported", SyntaxWarning),
("execfile.. not supported", DeprecationWarning)]