[Twisted-Python] Re: [Twisted-commits] Updated and added tests for twisted.sister. It may actually be usable for something now.
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Wed, Jun 26, 2002 at 05:22:03PM -0500, glyph CVS wrote:
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.
![](https://secure.gravatar.com/avatar/f7a516eb6ce7adb33702c522de9af1a3.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/269141092655512a3b5a234bf25d17b2.jpg?s=120&d=mm&r=g)
Paul Boehm wrote:
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
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
From: Paul Boehm <typo@soniq.net> Subject: [Twisted-Python] unpause() Date: Thu, 27 Jun 2002 13:25:13 +0200
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 |
![](https://secure.gravatar.com/avatar/f7a516eb6ce7adb33702c522de9af1a3.jpg?s=120&d=mm&r=g)
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 ;)
![](https://secure.gravatar.com/avatar/f7a516eb6ce7adb33702c522de9af1a3.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/269141092655512a3b5a234bf25d17b2.jpg?s=120&d=mm&r=g)
Paul Boehm wrote:
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
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
From: Paul Boehm <typo@soniq.net> Subject: [Twisted-Python] unpause() Date: Thu, 27 Jun 2002 13:25:13 +0200
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 |
![](https://secure.gravatar.com/avatar/f7a516eb6ce7adb33702c522de9af1a3.jpg?s=120&d=mm&r=g)
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