1 # -*- coding: utf-8 -*-
2 u
"""A module to test whether doctest recognizes some 2.2 features,
3 like static and class methods.
8 We include some (random) encoded (utf-8) text in the text surrounding
9 the example. It should be ignored:
17 from test
import test_support
18 if sys
.flags
.optimize
>= 2:
19 raise unittest
.SkipTest("Cannot test docstrings with -O2")
28 We include some (random) encoded (utf-8) text in the text surrounding
29 the example. It should be ignored:
71 def setx(self
, value
):
80 x
= property(getx
, setx
, doc
="""\
92 >>> print C.statm() # 16
94 >>> print C().statm() # 17
104 >>> print C.clsm(22) # 18
106 >>> print C().clsm(23) # 19
112 from test
import test_doctest2
114 f
, t
= test_support
.run_doctest(test_doctest2
)
116 raise test_support
.TestFailed("expected %d tests to run, not %d" %
119 # Pollute the namespace with a bunch of imported functions and classes,
120 # to make sure they don't get tested.
121 from doctest
import *
123 if __name__
== '__main__':