[Twisted-Python] Re: [Twisted-commits] Updated and added tests for twisted.sister. It may actually be usable for something now.
On Wed, Jun 26, 2002 at 05:22:03PM -0500, glyph CVS wrote:
Note: With this checkin we (sean and I) discovered that the unit tests are starting to interfere with each other. Currently a full run of the tests will not complete, and will in fact hang and be unresponsive to signals. Running individual test cases by themselves work fine, but they're interfering with each other by doing reactor-y things ... we need each test case to instantiate/start/stop the reactor, etc. I will buy chocolate for whoever does this first.
Maybe reactors need a .reset() method to completely clear their internal state? You could then modify runtests to do a reactor.reset() between each testcase, or something similar. That way test cases that forget to unregister old callLater calls, etc, won't pollute later tests. -Andrew.
imho self._runCallbacks() in Deferred.unpause() needs to be removed, because self.isError and self.results aren't neccesarily initialized at this point, yet. web.widgets can trigger this with its deferred widget rendering. any comments ? paul
Paul Boehm wrote:
imho self._runCallbacks() in Deferred.unpause() needs to be removed, because self.isError and self.results aren't neccesarily initialized at this point, yet.
web.widgets can trigger this with its deferred widget rendering.
any comments ?
That might explain the traceback I'm getting in Bugs ("exceptions.AttributeError: Deferred instance has no attribute 'isError'") on the root URL (localhost:8485) when there are no bugs in the database. -- Steve. Stephen C. Waterbury http://misspiggy.gsfc.nasa.gov/people/waterbug.html
From: Paul Boehm <typo@soniq.net> Subject: [Twisted-Python] unpause() Date: Thu, 27 Jun 2002 13:25:13 +0200
imho self._runCallbacks() in Deferred.unpause() needs to be removed, because self.isError and self.results aren't neccesarily initialized at this point, yet.
I think you're right; I ought to be checking self.called before self._runCallbacks().
web.widgets can trigger this with its deferred widget rendering.
any comments ?
I've fixed it, I think. Care to contribute a test case? ;) -- | <`'> | Glyph Lefkowitz: Traveling Sorcerer | | < _/ > | Lead Developer, the Twisted project | | < ___/ > | http://www.twistedmatrix.com |
On Thu, Jun 27, 2002 at 06:26:37PM -0500, Glyph Lefkowitz wrote:
I've fixed it, I think. Care to contribute a test case? ;) sure:
def testUnpauseBeforeCallback(self): d = defer.Deferred() d.pause() d.addCallback(self._callback) d.unpause() (this is equivalent to the problems web.widgets had with unpause, I think ;)
participants (4)
-
Andrew Bennetts
-
Glyph Lefkowitz
-
Paul Boehm
-
Steve Waterbury