• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

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/t/r/trestle-0.2/trestle/plugin.py   trestle(Download)
    def compare(self, response):
        class Ex:
            pass
 
        # switch to html/xml or json mode based on
        # response content type
        checker = header_checker = dt.OutputChecker()
    def compare(self, output):
        class Ex:
            pass
 
        checker = dt.OutputChecker()
        check_flags = dt.NORMALIZE_WHITESPACE|dt.ELLIPSIS
        report_flags = dt.REPORT_UDIFF

src/p/y/pycukes-0.2/specs/finding_hooks.py   pycukes(Download)
import os
import doctest
 
checker = doctest.OutputChecker()
 
story_text = """Story: Bowling Game
                As a bowling player

src/p/y/pylibs-HEAD/py/_plugin/pytest_doctest.py   pylibs(Download)
            lineno = test.lineno + example.lineno + 1
            message = excinfo.type.__name__
            reprlocation = ReprFileLocation(filename, lineno, message)
            checker = doctest.OutputChecker() 
            REPORT_UDIFF = doctest.REPORT_UDIFF
            filelines = py.path.local(filename).readlines(cr=0)
            i = max(test.lineno, max(0, lineno - 10)) # XXX? 

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/p/y/pypy3-HEAD/py/plugin/pytest_doctest.py   pypy3(Download)
            lineno = test.lineno + example.lineno + 1
            message = excinfo.type.__name__
            reprlocation = ReprFileLocation(filename, lineno, message)
            checker = doctest.OutputChecker() 
            REPORT_UDIFF = doctest.REPORT_UDIFF
            filelines = py.path.local(filename).readlines(cr=0)
            i = max(test.lineno, max(0, lineno - 10)) # XXX? 

src/p/y/pypy-HEAD/py/_plugin/pytest_doctest.py   pypy(Download)
            lineno = test.lineno + example.lineno + 1
            message = excinfo.type.__name__
            reprlocation = ReprFileLocation(filename, lineno, message)
            checker = doctest.OutputChecker() 
            REPORT_UDIFF = doctest.REPORT_UDIFF
            filelines = py.path.local(filename).readlines(cr=0)
            i = max(test.lineno, max(0, lineno - 10)) # XXX? 

src/p/y/python-daemon-HEAD/test/scaffold.py   python-daemon(Download)
            the ``OutputChecker`` rules.
 
            """
        checker = doctest.OutputChecker()
        want = textwrap.dedent(want)
        source = ""
        example = doctest.Example(source, want)

src/z/3/z3c.pt.compat-0.3/src/z3c/pt/compat/testing.py   z3c.pt.compat(Download)
    def text_compare(self, want, got, strip):
        if want is None: want = ""
        if got is None: got = ""
        checker = doctest.OutputChecker()
        return checker.check_output(
            want, got, doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE)
 

src/t/y/typecheck-0.3.5/tests/test_bwcompat_1-6.py   typecheck(Download)
 
        self.assertEquals(3, len(tests))
 
        runner = doctest.DocTestRunner(doctest.OutputChecker())
 
        for test in tests:
            runner.run(test)

src/t/e/testtools-0.9.6/testtools/matchers.py   testtools(Download)
            example += '\n'
        self.want = example # required variable name by doctest.
        self.flags = flags
        self._checker = doctest.OutputChecker()
 
    def __str__(self):
        if self.flags:

  1 | 2  Next