[Twisted-Python] probably stupid question about automated testing and reactor.run

Chris Norman chris.norman2 at googlemail.com
Wed Nov 7 09:17:26 MST 2018


Hi,
First of all please take what I'm about to say with a pinch of salt, as I
really don't know what I'm talking about half the time.

As reactors can only be started once, I would imagine calling it from a
test function would be largely pointless.

Depending on what test suite you're using there should be a way of calling
reactor.stop() at the end though... or something.

HTH,

On Wed, 7 Nov 2018 at 16:14, Chris Withers <chris at withers.org> wrote:

> Hi All,
>
> Sorry, the silly questions about testing keep coming...
>
> Is it legit for a unit testable piece of an application's code to call
> reactor.run()?
>
> How do you feed a reactor.stop() into such a test? Would that be a sane
> thing to try and do?
>
> How do people deal with this kind of testing?
>
> cheers,
>
> Chris
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>


-- 

Take care,

Chris Norman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20181107/3572bd70/attachment-0002.html>


More information about the Twisted-Python mailing list