summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_doctest2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_doctest2.py')
-rw-r--r--Lib/test/test_doctest2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_doctest2.py b/Lib/test/test_doctest2.py
index 86334d7..347a143 100644
--- a/Lib/test/test_doctest2.py
+++ b/Lib/test/test_doctest2.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""A module to test whether doctest recognizes some 2.2 features,
like static and class methods.
@@ -12,7 +11,11 @@ the example. It should be ignored:
"""
+import sys
+import unittest
from test import support
+if sys.flags.optimize >= 2:
+ raise unittest.SkipTest("Cannot test docstrings with -O2")
class C(object):
"""Class C.