Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-25 Thread Fabian Rothfuchs
Hey Jean-Paul (and all the others in this thread), Thank you very much for your help so far - I do really appreciate it! I'm well aware of the fact that `deferLater` does not magically turn blocking apps to non-blocking ones. The idea is, whatever SUDS does, in the end it should send a SOAP reque

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-24 Thread exarkun
On 02:34 pm, fabian.rothfu...@googlemail.com wrote: >Hey again! >Having the setup doing quite well so far, I just ran into a problem >that I >do not know how to debug: > >Testcase `setUp()` starts a server that subclasses >`twisted.web.resource.Resource` , as it's going to be a lightweight >SOAP

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-24 Thread Fabian Rothfuchs
Rothfuchs Date: Thursday, January 17, 2013 11:27 AM To: Twisted general discussion Subject: Re: [Twisted-Python] Stopping Reactor in UnitTest Callback While trying to minimalize my code, I discovered that the following line somewhere down deep the code is causing the whole te

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-15 Thread Itamar Turner-Trauring
On Tue, Jan 15, 2013 at 10:26 AM, Fabian Rothfuchs < fabian.rothfu...@googlemail.com> wrote: > Yes, I thought so, too. Indeed it happens that the reactor is started > automatically, but after the test succeeds, it's not being stopped (only > chance is to kill –9 it). > Perhaps the problem isn't w

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-15 Thread Fabian Rothfuchs
going from the workflow until a dummy server, returning the data that was sent by the protocol back to the test-callback. From: Itamar Turner-Trauring Reply-To: Twisted general discussion Date: Sunday, January 13, 2013 12:31 AM To: Twisted general discussion Subject: Re: [Twisted-Python] Stop

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-12 Thread Itamar Turner-Trauring
On Sat, Jan 12, 2013 at 9:00 AM, Fabian Rothfuchs < fabian.rothfu...@googlemail.com> wrote: > I'm in the dilemma of using both - Django and Twisted. > My goal is to have Django initialising the test (python manage.py test > ), instead of trial, as it will setup the whole test environment > (I.e. C

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-12 Thread Jonathan Lange
On Sat, Jan 12, 2013 at 2:00 PM, Fabian Rothfuchs wrote: > I'm in the dilemma of using both - Django and Twisted. > My goal is to have Django initialising the test (python manage.py test > ), instead of trial, as it will setup the whole test environment > (I.e. Creates a db copy, allows per-model

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-12 Thread Fabian Rothfuchs
I'm in the dilemma of using both - Django and Twisted. My goal is to have Django initialising the test (python manage.py test ), instead of trial, as it will setup the whole test environment (I.e. Creates a db copy, allows per-model testing, follows certain conventions, etc). As to that I'm trying

Re: [Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-10 Thread exarkun
On 07:58 pm, fabian.rothfu...@googlemail.com wrote: >Hey there, > > >I'm trying to start and stop a twisted server in a unittest: >http://dpaste.org/qwaUt/ . Why? This isn't the typical way to write unit tests for Twisted-based code. The reactor is started and stopped by trial as necessary. Yo

[Twisted-Python] Stopping Reactor in UnitTest Callback

2013-01-10 Thread F Rothfuchs
Hey there, I'm trying to start and stop a twisted server in a unittest: http://dpaste.org/qwaUt/ . Calling reactor.stop() in the callback causes a KeyboardInterrupt exception, and tearDown gets never executed, as it's probably waiting for the test to finish. After calling `trial d.py` you need