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

All Samples(13)  |  Call(0)  |  Derive(0)  |  Import(13)
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, \
        # This flag causes doctest to ignore any differences in the
        # contents of whitespace strings.  Note that this can be used
        # in conjunction with the ELLIPSIS flag.
        if optionflags & NORMALIZE_WHITESPACE:
            got = ' '.join(got.split())
            want = ' '.join(want.split())
            if got == want:

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/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/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

src/p/y/PyBrain-0.3/pybrain/tests/testsuites.py   PyBrain(Download)
"""Module that contains several utilities for testing."""
 
__author__ = 'Justin Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
 
 
from doctest import DocTestSuite, ELLIPSIS, REPORT_ONLY_FIRST_FAILURE, \
def runModuleTestSuite(module):
    """Runs a test suite for all local tests."""
    suite = TestSuite([TestLoader().loadTestsFromModule(module)])
 
    # Add local doctests
    optionflags = ELLIPSIS | NORMALIZE_WHITESPACE | REPORT_ONLY_FIRST_FAILURE
 

src/p/r/Products.QuillsEnabled-1.7.0/Products/QuillsEnabled/tests/test_docfile.py   Products.QuillsEnabled(Download)
import unittest
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
 
from zope.testing import doctest
from Testing.ZopeTestCase.zopedoctest import ZopeDocFileSuite
from Testing import ZopeTestCase
from Products.PloneTestCase import PloneTestCase
 
# Standard options for DocTests
optionflags = (ELLIPSIS |
    NORMALIZE_WHITESPACE )
 
ZOPE_DEPS = []
PLONE_DEPS = [PROJECTNAME,]

src/p/r/Products.Quills-1.7.0/Products/Quills/tests/test_docfile.py   Products.Quills(Download)
import unittest
 
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
from Testing.ZopeTestCase.zopedoctest import ZopeDocFileSuite
from Testing import ZopeTestCase
from Products.PloneTestCase import PloneTestCase
from Products.PloneTestCase.layer import PloneSite
 
# Standard options for DocTests
optionflags = (ELLIPSIS |
    NORMALIZE_WHITESPACE )
 
ZOPE_DEPS = []
PLONE_DEPS = [PROJECTNAME,]

src/p/l/plone.app.blob-1.3/src/plone/app/blob/tests/test_doctests.py   plone.app.blob(Download)
from unittest import TestSuite
from doctest import ELLIPSIS, NORMALIZE_WHITESPACE
 
from Testing.ZopeTestCase import ZopeDocFileSuite
from plone.app.blob.tests.base import BlobFunctionalTestCase
from plone.app.blob.tests.base import ReplacementFunctionalTestCase
from plone.app.blob.tests.base import BlobLinguaFunctionalTestCase
from plone.app.blob.tests.utils import hasLinguaPlone
 
 
def test_suite():
    optionflags = (ELLIPSIS | NORMALIZE_WHITESPACE)

src/i/c/ice.adverlet-0.2.3/src/ice/adverlet/tests/tests.py   ice.adverlet(Download)
 
import os.path
from unittest import TestSuite
from doctest import DocFileSuite, NORMALIZE_WHITESPACE, ELLIPSIS
from zope.app.testing.setup import placefulSetUp, placefulTearDown
from zope.testing.doctestunit import DocFileSuite
from zope.security.management import getInteraction
def test_suite():
    return TestSuite(
        (DocFileSuite('README.txt',
                      package='ice.adverlet',
                      setUp=setUp, tearDown=tearDown,
                      optionflags=NORMALIZE_WHITESPACE | ELLIPSIS,
                      ),))

  1 | 2  Next