All Samples(1) | Call(0) | Derive(0) | Import(1)
int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. If base is zero, the proper base is guessed based on the string content. If the argument is outside the integer range a long object will be returned instead.
src/m/i/MiniMock-1.2.5/minimock.py MiniMock(Download)
self.options = doctest.ELLIPSIS
self.options |= doctest.NORMALIZE_INDENTATION
self.options |= doctest.NORMALIZE_FUNCTION_PARAMETERS
self.options |= doctest.REPORT_UDIFF
def check(self, want):
r"""
src/t/r/trestle-0.2/trestle/plugin.py trestle(Download)
content = '\n'.join(content) + '\n'
check_flags = dt.NORMALIZE_WHITESPACE|dt.ELLIPSIS
report_flags = dt.REPORT_UDIFF
if headers:
got_headers = '\n'.join(
[response.full_status] +
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/pytemplate-HEAD/setup.py pytemplate(Download)
def initialize_options(self):
"""Set default values for options"""
self.exit_on_fail = False
self.doctest_opts = doctest.REPORT_UDIFF|doctest.NORMALIZE_WHITESPACE
#: Mock objects to include for test framework
self.extraglobs = {
"urllib": test.mock.urllib,
src/p/y/pyisbn-HEAD/setup.py pyisbn(Download)
def initialize_options(self):
"""Set default values for options"""
self.exit_on_fail = False
self.doctest_opts = doctest.REPORT_UDIFF|doctest.NORMALIZE_WHITESPACE
self.extraglobs = {
"urllib": test.mock.urllib,
} #: Mock objects to include for test framework
src/z/o/zope.testing-3.10.0/src/zope/testing/doctest/__init__.py zope.testing(Download)
# Option constants.
from doctest import register_optionflag, \
OPTIONFLAGS_BY_NAME, \
DONT_ACCEPT_TRUE_FOR_1, \
DONT_ACCEPT_BLANKLINE, \
def _do_a_fancy_diff(self, want, got, optionflags):
# Not unless they asked for a fancy diff.
if not optionflags & (REPORT_UDIFF |
REPORT_CDIFF |
REPORT_NDIFF):
return False
want_lines = want.splitlines(True) # True == keep line ends
got_lines = got.splitlines(True)
# Use difflib to find their differences.
if optionflags & REPORT_UDIFF:
diff = difflib.unified_diff(want_lines, got_lines, n=2)
diff = list(diff)[2:] # strip the diff header
kind = 'unified diff with -expected +actual'
src/p/y/pylibs-HEAD/py/_plugin/pytest_doctest.py pylibs(Download)
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?
lines = []
src/p/y/pypy3-HEAD/py/plugin/pytest_doctest.py pypy3(Download)
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?
lines = []
src/e/p/epydoc-HEAD/src/epydoc/test/__init__.py epydoc(Download)
# Options for doctest:
options = doctest.ELLIPSIS
doctest.set_unittest_reportflags(doctest.REPORT_UDIFF)
# Use a custom parser
parser = DocTestParser()
src/e/p/epydoc-HEAD/epydoc/src/epydoc/test/__init__.py epydoc(Download)
# Options for doctest:
options = doctest.ELLIPSIS
doctest.set_unittest_reportflags(doctest.REPORT_UDIFF)
# Use a custom parser
parser = DocTestParser()
src/p/y/pypy-HEAD/py/_plugin/pytest_doctest.py pypy(Download)
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?
lines = []
1 | 2 | 3 Next