Ticket #5853 enhancement closed fixed
Add a TestCase which does not support asynchronous tests but which does have the other nice features of trial
|Reported by:||exarkun||Owned by:||exarkun|
|Priority:||normal||Milestone:||Python 3.3 Minimal|
(diff, github, buildbot, log)
twisted.trial.unittest.TestCase is the public interface for a great deal of functionality. It provides a number of convenient testing helpers which the standard library unittest.TestCase is missing (although fortunately the standard library is slowly catching up). It also provides support for reactor-based asynchronous tests, which is sometimes a convenient way to write tests.
These are unrelated concerns, though. For the sake of factoring, code simplicity, and (most recently) porting to Python 3, it would be convenient if the reactor-related functionality were provided separately from the other (simpler) functionality.
The idea for doing this is to have a couple different TestCase classes provided by trial. One of which is just the simple testing conveniences (such as mktemp and our various extra assertion methods), the other of which adds to these the reactor-based testing features.
Another explicit goal of this work is for parts of trial's test suite which don't depend on the reactor (and which therefore don't test parts of trial that depend on the reactor) to be tested with the non-reactor version of this TestCase, allowing for a more incremental bootstrapping of trial onto Python 3.