All Samples(57) | Call(24) | Derive(23) | Import(10)
A class used to extract the DocTests that are relevant to a given object, from its docstring and the docstrings of its contained objects. Doctests can currently be extracted from the following object types: modules, functions, classes, methods, staticmethods, classmethods, and properties.
src/m/u/mutant-HEAD/mutant.py mutant(Download)
def _quiet_testmod(module):
"""
Run all of a modules doctests, not producing any output to stdout.
Return a tuple with the number of failures and the number of tries.
"""
finder = doctest.DocTestFinder(exclude_empty=False)
runner = doctest.DocTestRunner(verbose=False)
src/m/u/mutant-0.1/mutant.py mutant(Download)
def _quiet_testmod(module):
"""
Run all of a modules doctests, not producing any output to stdout.
Return a tuple with the number of failures and the number of tries.
"""
finder = doctest.DocTestFinder(exclude_empty=False)
runner = doctest.DocTestRunner(verbose=False)
src/s/h/shelldoctest-0.2/shelldoctest/shelldoctest.py shelldoctest(Download)
raise TypeError("testmod: module required; %r" % (m,))
if name is None:
name = m.__name__
finder = doctest.DocTestFinder(parser=ShellDocTestParser(), exclude_empty=exclude_empty)
if raise_on_error:
runner = doctest.DebugRunner(verbose=verbose, optionflags=optionflags)
else:
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test/test_zipimport_support.py ironruby(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.test_support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/test/test_zipimport_support.py ironruby(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.test_support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
src/j/y/jython-HEAD/sandbox/wierzbicki/test27/CPythonLib/test/test_zipimport_support.py jython(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.test_support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
src/i/p/ipython-py3k-HEAD/IPython/testing/ipunittest.py ipython-py3k(Download)
import re
import sys
import unittest
from doctest import DocTestFinder, DocTestRunner
try:
from doctest import TestResults
except:
"""
self.verbose = verbose
# We can reuse the same finder for all instances
self.finder = DocTestFinder(verbose=verbose, recurse=False)
def __call__(self, func):
"""Use as a decorator: doctest a function's docstring as a unittest.
src/p/y/pypy3-HEAD/lib-python/3.1.2/test/test_zipimport_support.py pypy3(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
src/p/y/pywii-HEAD/Python-3.1.2/Lib/test/test_zipimport_support.py pywii(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
src/p/y/pyvm-HEAD/projects/python_in_a_can/trunk/win32/python-2.7/Lib/test/test_zipimport_support.py pyvm(Download)
def _run_object_doctest(obj, module):
# Direct doctest output (normally just errors) to real stdout; doctest
# output shouldn't be compared by regrtest.
save_stdout = sys.stdout
sys.stdout = test.test_support.get_original_stdout()
try:
finder = doctest.DocTestFinder(verbose=verbose, recurse=False)
1 | 2 | 3 Next