[Twisted-Python] Asynchronous unit tests
Jonathan Lange
jonathan.lange at turnaroundsolutions.com
Mon Oct 28 05:17:39 MST 2002
Attached is an asynchronous unit testing framework.
If you inherit from deferunittest.DeferredTestCase instead of inheriting from unittest.TestCase, then test methods can return a Deferred, which should be handled appropriately by the framework.
An example test suite is also attached.
Note that this required some modifications to the pyunit.unittest, in order to make things accessible to the subclass. A patch to the unittest.py currently in twisted cvs is attached.
I'm not feeling too sure about this whole thing, so feedback is highly appreciated.
cheers,
jml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unittest.py-patch
Type: application/octet-stream
Size: 6075 bytes
Desc: unittest.py-patch
URL: </pipermail/twisted-python/attachments/20021028/80a81778/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deferunittest.py
Type: application/octet-stream
Size: 3295 bytes
Desc: deferunittest.py
URL: </pipermail/twisted-python/attachments/20021028/80a81778/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_deferdemo.py
Type: application/octet-stream
Size: 3280 bytes
Desc: test_deferdemo.py
URL: </pipermail/twisted-python/attachments/20021028/80a81778/attachment-0008.obj>
More information about the Twisted-Python
mailing list