Did I find the right examples for you? yes no

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)
DEPRECATED in Twisted 2.5.  See L{TestCase.flushLoggedErrors}.

Support function for testing frameworks.

Return a list of errors that occurred since the last call to flushErrors().
(This will return None unless startKeepingErrors has been called.)

        def flushErrors(*errorTypes):
    """
    DEPRECATED in Twisted 2.5.  See L{TestCase.flushLoggedErrors}.

    Support function for testing frameworks.

    Return a list of errors that occurred since the last call to flushErrors().
    (This will return None unless startKeepingErrors has been called.)
    """

    warnings.warn("log.flushErrors is deprecated since Twisted 2.5. "
                  "If you need to flush errors from within a unittest, "
                  "use TestCase.flushLoggedErrors instead.",
                  category=DeprecationWarning, stacklevel=2)
    return _flushErrors(*errorTypes)
        


src/z/o/zope.app.twisted-3.5.0/src/twisted/test/test_log.py   zope.app.twisted(Download)
            i = self.catcher.pop()
            self.assertEquals(i['isError'], 1)
            log.flushErrors(ig)
 
    def testErrorsWithWhy(self):
            self.assertEquals(i['isError'], 1)
            self.assertEquals(i['why'], 'foobar')
            log.flushErrors(ig)
 
 

src/z/o/zope.app.twisted-3.5.0/src/twisted/web/test/test_xmlrpc.py   zope.app.twisted(Download)
            dl.append(d)
        d = defer.DeferredList(dl, fireOnOneErrback=True)
        d.addCallback(lambda ign: log.flushErrors(TestRuntimeError, TestValueError))
        return d
 

src/z/o/zope.app.twisted-3.5.0/src/twisted/test/test_defer.py   zope.app.twisted(Download)
        self.assertEquals(len(c2), 2)
        c2[1]["failure"].trap(ZeroDivisionError)
        log.flushErrors(ZeroDivisionError)
 
 

src/z/o/zope.app.twisted-3.5.0/src/twisted/test/test_pb.py   zope.app.twisted(Download)
                                   ("user", "wrongpass")]:
            d.addCallback(self._testBadLogin_once, username, password)
        d.addBoth(lambda res: log.flushErrors(UnauthorizedLogin))
        return d
 

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Twisted/twisted/conch/test/test_ssh.py   hortonworks-sandbox(Download)
            """
            log.msg('unknown open failed')
            log.flushErrors()
            self.conn.addResult()
 
        def _ebRequestWorked(self, ignored):
            log.msg('fail exec finished')
            log.flushErrors()
            self.conn.addResult()
            self.loseConnection()

src/f/l/flumotion-HEAD/flumotion/test/test_pb.py   flumotion(Download)
    def flushNotAuthenticatedError(self):
        try:
            self.flushLoggedErrors(errors.NotAuthenticatedError)
        except AttributeError:
            tlog.flushErrors(errors.NotAuthenticatedError)

src/f/l/flumotion-HEAD/flumotion/common/testsuite.py   flumotion(Download)
        except AttributeError:
            from twisted.python import log as tlog
            tlog.flushErrors(*types)
 
    def tearDown(self):

src/d/i/divmod.org-HEAD/Epsilon/epsilon/test/test_setuphelper.py   divmod.org(Download)
    def testRegeneratingIt(self):
        for mod in self.removedModules:
            self.failIf(mod.__name__ in sys.modules, 'Started with %r loaded: %r' % (mod.__name__, sys.path))
        _regeneratePluginCache(['axiom', 'xmantissa'])
        log.flushErrors(ImportError) # This is necessary since there are Axiom

src/e/p/Epsilon-0.7.0/epsilon/test/test_setuphelper.py   Epsilon(Download)
    def testRegeneratingIt(self):
        for mod in self.removedModules:
            self.failIf(mod.__name__ in sys.modules, 'Started with %r loaded: %r' % (mod.__name__, sys.path))
        _regeneratePluginCache(['axiom', 'xmantissa'])
        log.flushErrors(ImportError) # This is necessary since there are Axiom

src/z/o/zope.app.twisted-3.5.0/src/twisted/web2/test/test_wsgi.py   zope.app.twisted(Download)
    def flushErrors(self, result, error):
        log.flushErrors(error)
        return result
 
    def test_getContainedResource(self):

  1 | 2  Next