• 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/m/i/MiniMock-1.2.5/minimock.py   MiniMock(Download)
class MinimockOutputChecker(doctest.OutputChecker, object):
    """Class for matching output of MiniMock objects against expectations.
    """
 
    def check_output(self, want, got, optionflags):
        if (optionflags & doctest.NORMALIZE_INDENTATION):
            want = textwrap.dedent(want).rstrip()

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/z/e/zenoss-HEAD/trunk/Products/Five/testing/renormalizing.py   zenoss(Download)
class RENormalizing(doctest.OutputChecker):
    """Pattern-normalizing outout checker
    """
 
    def __init__(self, patterns):
        self.patterns = patterns
 

src/z/e/zenoss-HEAD/Products/Five/testing/renormalizing.py   zenoss(Download)
class RENormalizing(doctest.OutputChecker):
    """Pattern-normalizing outout checker
    """
 
    def __init__(self, patterns):
        self.patterns = patterns
 

src/r/d/rdkit-HEAD/trunk/Docs/Book/runtests.py   rdkit(Download)
class ErrorIgnorer(doctest.OutputChecker):
    def check_output(self,want,got,optionflags):
        if want:
            if want[0]=='#' and not got:
                return True
            want = want.split('#<-')[0]
        return doctest.OutputChecker.check_output(self,want,got,optionflags)

src/r/d/rdkit-HEAD/Docs/Book/runtests.py   rdkit(Download)
class ErrorIgnorer(doctest.OutputChecker):
    def check_output(self,want,got,optionflags):
        if want:
            if want[0]=='#' and not got:
                return True
            want = want.split('#<-')[0]
        return doctest.OutputChecker.check_output(self,want,got,optionflags)

src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/renormalizing.py   sage(Download)
class RENormalizing(doctest.OutputChecker):
    """Pattern-normalizing outout checker
    """
 
    def __init__(self, patterns):
        self.patterns = patterns
 

src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/renormalizing.py   sage(Download)
class RENormalizing(doctest.OutputChecker):
    """Pattern-normalizing outout checker
    """
 
    def __init__(self, patterns):
        self.patterns = patterns
 

src/z/a/zamboni-lib-HEAD/lib/python/IPython/testing/plugin/ipdoctest.py   zamboni-lib(Download)
class IPDoctestOutputChecker(doctest.OutputChecker):
    """Second-chance checker with support for random tests.
 
    If the default comparison doesn't pass, this checker looks in the expected
    output string for flags that tell us to ignore the output.
    """
 

  1 | 2 | 3 | 4  Next