[Twisted-Python] Running Twisted tests with testtools
free at 64studio.com
Fri Feb 10 06:21:57 EST 2012
|--==> On Fri, 10 Feb 2012 09:50:10 +0000, Jonathan Lange <jml at mumak.net> said:
JL> On Fri, Feb 10, 2012 at 8:43 AM, Free Ekanayaka <free at 64studio.com> wrote:
>>|--==> On Wed, 8 Feb 2012 22:12:34 +0000, Jonathan Lange <jml at mumak.net> said:
>> >>Would you elaborate on that and explain why you come to prefer it over
>> >>trial for your new projects?
>> JL> That's mostly documented here:
>> JL> http://testtools.readthedocs.org/en/latest/overview.html
>> JL> and in the other docs. In a nutshell: details, fixtures, matchers, and
>> JL> a bunch of unittest extensions that make it much more flexible, making
>> JL> it easy to write things like parallel test runners
>>Yeah, I like these features a lot too, but leaving out AsynchronousDeferredRunTest
>>maybe one could use all these features on top of trial's TestCase,
>>by using testtool's TestCase as a kind of mixin. Not sure it'd work in
JL> Why would you want to?
Maybe be not really that, but I was mainly wondering, maybe Twisted's
trial machinery for handling tests returning deferreds could be factored
in a way that it can be re-used by AsynchronousDeferredRunTest (which
would just be glue code for integrating with testtool's TestCase). This
way testtool's twisted support would be based on twisted itself.
Not sure it's worth doing if this generalization/refactoring would lead
to more complex code, but I thought I'd mention it.
More information about the Twisted-Python