[Dev] Mock Reactor for tests?
Heikki Toivonen
heikki at osafoundation.org
Tue Jun 7 20:03:40 PDT 2005
Phillip J. Eby wrote:
>> Uh oh. Well that could be a problem. Unit tests typically want to do
>> lots of asserts all over the place.
>
>
> Well, you could just do:
Got it.
>> How would you see this file would need to change to run two tests with
>> twisted in it?
>>
>> http://lxr.osafoundation.org/m2crypto/source/tests/test_ssl.py
>
> These are high-level integration tests, not unit tests, so it's hard to
> say. The test reactor isn't going to help with this kind of testing.
Sorry, I should have explained some more.
The test_twisted_wrapper() could be done using the testreactor we have
discussed in this thread with mocket. But if it would be possible to
start and stop the testreactor as many times as I wanted I would just
replace the reactor with testreactor, along with the deferred sample you
showed, and I should be all set. So I think I actually answered my own
question.
--
Heikki Toivonen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/dev/attachments/20050607/759de789/signature.pgp
More information about the Dev
mailing list