Optional keyword arg "encoding" specifies an encoding that should
be used to convert the file to unicode.
-
+
Advanced tomfoolery: testmod runs methods of a local instance of
class doctest.Tester, then merges the results into (or creates)
global Tester instance doctest.master. Methods of doctest.master
# Find the file and read it.
name = os.path.basename(path)
-
+
# If an encoding is specified, use it to convert the file to unicode
if encoding is not None:
doc = doc.decode(encoding)
parser
A DocTestParser (or subclass) that should be used to extract
tests from the files.
-
+
encoding
An encoding that will be used to convert the files to unicode.
"""
# The wraps function makes it easy to avoid the bug that afflicts the
# decorator example in the python-dev email proposing the
# update_wrapper function:
-# http://mail.python.org/pipermail/python-dev/2006-May/064775.html
\ No newline at end of file
+# http://mail.python.org/pipermail/python-dev/2006-May/064775.html