All Samples(44) | Call(18) | Derive(24) | Import(2)
A class used to check the whether the actual output from a doctest example matches the expected output. `OutputChecker` defines two methods: `check_output`, which compares a given pair of outputs, and returns true if they match; and `output_difference`, which returns a string describing the differences between two outputs.
src/p/i/pip-HEAD/tests/test_freeze.py pip(Download)
import sys
import re
import textwrap
from doctest import OutputChecker, ELLIPSIS
from test_pip import reset_env, run_pip, write_file, get_env
from local_repos import local_checkout, local_repo
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
def _check_output(result, expected):
checker = OutputChecker()
src/s/p/sprox-0.6.10/tests/test_doctests.py sprox(Download)
def check_output_xml(want, got, optionsflags):
return eq_xml(want, got)
from doctest import OutputChecker
original_check_output = OutputChecker.check_output
import doctest
XML_OUTPUT = doctest.register_optionflag("XML")
class MyOutputChecker(doctest.OutputChecker):