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.
Change History (16)
comment:6 Changed 3 years ago by exarkun
- Branch changed from branches/synchronous-testcase-5853 to branches/synchronous-testcase-5853-2
comment:9 Changed 3 years ago by itamar
- Keywords review removed
- Owner changed from itamar to exarkun
comment:10 Changed 3 years ago by exarkun
- Keywords review added
- Owner changed from exarkun to itamar