• 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, \
    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
 
 
        # ndiff does intraline difference marking, so can be useful even
        # for 1-line differences.
        if optionflags & REPORT_NDIFF:
            return True
 
        # The other diff types need at least a few lines to be helpful.
                diff = difflib.context_diff(want_lines, got_lines, n=2)
                diff = list(diff)[2:] # strip the diff header
                kind = 'context diff with expected followed by actual'
            elif optionflags & REPORT_NDIFF:
                engine = difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK)
                diff = list(engine.compare(want_lines, got_lines))
                kind = 'ndiff with -expected +actual'

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/t/e/testfixtures-1.8.0dev-r4464/testfixtures/tests/test_replacer.py   testfixtures(Download)
from __future__ import with_statement
# Copyright (c) 2008 Simplistix Ltd
# See license.txt for license details.
 
from doctest import DocTestSuite, REPORT_NDIFF,ELLIPSIS
from testfixtures import Replacer
from unittest import TestSuite
def test_suite():
    return TestSuite((
        DocTestSuite(optionflags=REPORT_NDIFF|ELLIPSIS),
        ))
 

src/t/e/testfixtures-1.8.0dev-r4464/testfixtures/tests/test_docs.py   testfixtures(Download)
# Copyright (c) 2009-2010 Simplistix Ltd
#
# See license.txt for more details.
 
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest,codeblock,capture
from manuel.testing import TestSuite
from os.path import dirname,join,pardir
from testfixtures.manuel import Files
 
def test_suite():
    m =  doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS)

src/r/e/resolve-1.0.0/resolve/tests/test_docs.py   resolve(Download)
# See license.txt for more details.
 
import unittest
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
options = REPORT_NDIFF|ELLIPSIS
 

src/m/a/mailinglogger-3.3.3/mailinglogger/tests/zconfig.py   mailinglogger(Download)
except ImportError:
    # we don't have a hard dependency on ZConfig
    pass
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
def setUp(test):
    shared_setUp(test)

src/m/a/mailinglogger-3.3.3/mailinglogger/tests/test_zope3.py   mailinglogger(Download)
import unittest
 
from zconfig import setUp,tearDown,Tests
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
class Zope3Tests(Tests):
 
    def getConfigPostfix(self):
        return '\n</eventlog>'
 
options = REPORT_NDIFF|ELLIPSIS
 
def test_suite():
    try:

src/m/a/mailinglogger-3.3.3/mailinglogger/tests/test_zope2.py   mailinglogger(Download)
import unittest
 
from zconfig import setUp,tearDown,Tests
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
class Zope2Tests(Tests):
 
    def getConfigPostfix(self):
        return '\n</eventlog>'
 
options = REPORT_NDIFF|ELLIPSIS
 
def test_suite():
    try:

src/m/a/mailinglogger-3.3.3/mailinglogger/tests/test_zconfig.py   mailinglogger(Download)
import unittest
 
from zconfig import setUp,tearDown,Tests
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
schema_text = '''
<schema>
    def getConfigPostfix(self):
        return '\n</eventlog>'
 
options = REPORT_NDIFF|ELLIPSIS
def test_suite():
    try:
        import ZConfig

src/m/a/mailinglogger-3.3.3/mailinglogger/tests/test_docs.py   mailinglogger(Download)
 
import unittest
from shared import setUp,tearDown
from doctest import DocFileSuite, REPORT_NDIFF,ELLIPSIS
 
options = REPORT_NDIFF|ELLIPSIS
def test_suite():

  1 | 2  Next