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

All Samples(10)  |  Call(0)  |  Derive(0)  |  Import(10)
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/a/n/an_example_pypi_project-0.0.5/tests/run_all.py   an_example_pypi_project(Download)
 
import doctest
import test0
doctest.testmod(test0, optionflags=doctest.NORMALIZE_WHITESPACE |
                                   doctest.ELLIPSIS |
                                   doctest.REPORT_ONLY_FIRST_FAILURE
                                   )

src/z/a/zamboni-lib-HEAD/lib/python/IPython/external/simplegeneric.py   zamboni-lib(Download)
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
 

src/i/p/ipython-py3k-HEAD/IPython/external/simplegeneric.py   ipython-py3k(Download)
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
 

src/i/p/ipython-0.10/IPython/external/simplegeneric.py   ipython(Download)
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
 

src/c/h/chessmind.core-0.3/chessmind/core/__init__.py   chessmind.core(Download)
def _test():
    import doctest
    import sys
    optionflags = (doctest.ELLIPSIS |
                   doctest.NORMALIZE_WHITESPACE |
                   doctest.REPORT_ONLY_FIRST_FAILURE)
    verbose = "-v" in sys.argv

src/t/r/translate-HEAD/src/trunk/virtaal/virtaal/support/simplegeneric.py   translate(Download)
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
 

src/i/m/imsvdex-1.0/imsvdex/vdex.py   imsvdex(Download)
 
    suite = doctest.DocFileSuite(
            'vdex.txt',
            optionflags=doctest.ELLIPSIS + doctest.REPORT_ONLY_FIRST_FAILURE)
 
    unittest.TextTestRunner().run(suite)
 

src/s/i/simplegeneric-0.7/simplegeneric.py   simplegeneric(Download)
def test_suite():
    import doctest
    return doctest.DocFileSuite(
        'README.txt',
        optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE,
    )
 

src/t/w/twodeg.nosedjango-0.1dev/twodeg/nosedjango/nosedjango.py   twodeg.nosedjango(Download)
 
        if isinstance(test.test, doctest.DocTestCase):
            test.test._dt_optionflags += doctest.ELLIPSIS | \
                                         doctest.REPORT_ONLY_FIRST_FAILURE

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, \
 
            # If REPORT_ONLY_FIRST_FAILURE is set, then supress
            # reporting after the first failure.
            quiet = (self.optionflags & REPORT_ONLY_FIRST_FAILURE and
                     failures > 0)
 
            # Merge in the example's options.
            # so add the default reporting flags
            optionflags |= doctest._unittest_reportflags
 
        if doctest._unittest_reportflags & REPORT_ONLY_FIRST_FAILURE:
            optionflags |= REPORT_ONLY_FIRST_FAILURE
 
        runner = DocTestRunner(optionflags=optionflags,

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next