All Samples(43) | Call(0) | Derive(0) | Import(43)
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/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, \
# The ELLIPSIS flag says to let the sequence "..." in `want`
# match any substring in `got`.
if optionflags & ELLIPSIS:
if _ellipsis_match(want, got):
return True
src/y/o/yoma-HEAD/yoma.nspersistent/trunk/src/yoma/nspersistent/tests.py yoma(Download)
""" from unittest import TestSuite, main from doctest import DocFileSuite, DocTestSuite, ELLIPSIS, NORMALIZE_WHITESPACE from zope.component.testing import setUp, tearDown optionflags = ELLIPSIS | NORMALIZE_WHITESPACE
src/y/o/yoma-HEAD/yoma.nsobject/trunk/src/yoma/nsobject/tests.py yoma(Download)
import objc from unittest import TestSuite, main from doctest import DocFileSuite, DocTestSuite, ELLIPSIS, NORMALIZE_WHITESPACE from zope.component.testing import setUp, tearDown optionflags = ELLIPSIS | NORMALIZE_WHITESPACE
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
def banner(msg):
return '\n========== %s ==========\n' % msg
assert checker.check_output(expected, actual, ELLIPSIS), banner('EXPECTED')+expected+banner('ACTUAL')+actual+banner(6*'=')
def test_freeze():
src/d/i/divvy.fps-HEAD/src/divvy/fps/tests/test_doc.py divvy.fps(Download)
import doctest import os import unittest from doctest import NORMALIZE_WHITESPACE, ELLIPSIS from divvy.fps import testing, conf def get_stub_file(fn):
def test_suite():
return unittest.TestSuite([
doctest.DocFileSuite("../README.txt",
optionflags=NORMALIZE_WHITESPACE | ELLIPSIS,
setUp=setup_readme,
tearDown=teardown_readme),
])
src/s/m/sms.py-HEAD/src/sms/tests.py sms.py(Download)
from doctest import DocFileSuite, ELLIPSIS
class DummyConnection(object):
def __init__(self):
self.w = ''
self.response = []
self.timeout = .5
def test_suite():
return DocFileSuite('README.txt',
globs={'DummyConnection':DummyConnection},
optionflags = ELLIPSIS)
src/z/o/zope2instance-1.1/zope2instance/tests.py zope2instance(Download)
# Copyright (c) 2010 Simplistix Ltd # # See license.txt for more details. from doctest import REPORT_NDIFF,ELLIPSIS, Example from glob import glob from manuel import doctest,codeblock,capture
open(os.path.join(base, name+'.egg-link'), 'w'
).write(dist.location)
options = REPORT_NDIFF|ELLIPSIS
checker = renormalizing.RENormalizing([
zc.buildout.testing.normalize_path,
(re.compile(
src/z/o/Zope2-2.12.12/src/Products/Five/browser/tests/test_zope3security.py Zope2(Download)
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
src/z/o/Zope2-2.12.12/src/Products/Five/browser/tests/test_i18n.py Zope2(Download)
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
src/z/3/z3c.checkversions-0.4.1/z3c/checkversions/test.py z3c.checkversions(Download)
#
##############################################################################
from doctest import DocFileSuite, ELLIPSIS, NORMALIZE_WHITESPACE
import unittest
def test():
optionflags = ELLIPSIS|NORMALIZE_WHITESPACE
1 | 2 | 3 | 4 | 5 Next