[Twisted-Python] Running Twisted tests with testtools
free at 64studio.com
Wed Feb 8 12:22:19 EST 2012
|--==> On Wed, 8 Feb 2012 02:05:22 -0500, Glyph <glyph at twistedmatrix.com> said:
G> The position that Twisted can take is that Trial is awesome and you
G> should use Trial. testtools is a separate project, and you may
G> elect to use it to enhance your trial experience.
That sounds good to me.
>>Also, from what I had heard it'd be technically not possible to provide
>>a compatibility layer, is that accurate?
G> It's already compatible, as Jonathan said. You can just use the
G> trial runner with testtools tests.
Even those returning deferreds and using AsynchronousDeferredRunTest? I
presume so, just asking to be sure.
Also, testtools has an AsynchronousDeferredRunTestForBrokenTwisted class
too which I believe mimics more closely what trial currently does, so
I'm not sure what the difference between AsynchronousDeferredRunTest and
AsynchronousDeferredRunTestForBrokenTwisted would be when using trial to
run such tests.
I didn't really look into code tough.
>>Personally, if testtools ever becomes the blessed tool for testing
>>twisted-based projects, I would not mind at all to have to replace
G> For a nominal donation to the project, someone from the Twisted
G> project can come to your office, put on some ridiculous priest
G> costume and sanctify whatever toolchain you want to use. ;-)
>>However it'd be good if Twisted took a clear position on this,
G> Nope. We write software, not position papers :).
Okay maybe I used the wrong wording. I was asking for a "position"
because I got the impression that Jonathan is considering testtools a
sort of trial2 that provides improvements over trial, but that was not
likely going to replace only it because of compatibility reasons. Please
Jonathan correct me if it's not the case.
So *if* testtools is considered superior to trial for some reason, but
it's problematic for Twisted to internally drop trial in favor of
testtools, I was wondering if it was the case to (also) point people to
testtools from the Twisted website/documentaiton, or something along
If it's not the case and it's just a matter of preference, than fine.
G> Trial is a supported tool that is part of Twisted. It works great
G> for me every single day. It can work great for you.
Sure, same here.
G> I think that the main risks to "languishing" or "not taking off"
G> for both Trial and testtools are issues with their own
G> documentation and promotional materials, not in any conflict with
G> each other. If you're worried about it, contribute code or
G> documentation or blog-posts or what have you to one or both
G> projects :).
Probably a good addition to the documentation of the two projects would
be to describe the differences between the two and if there is any
reason one should use one or the other, beside bare taste. I can surely
help with that when I have better picture myself.
More information about the Twisted-Python