#3535 enhancement reopened
TrialRunner hides features of non-twisted test cases
|Reported by:||jamesh||Owned by:|
I've been using a package called testresources (https://launchpad.net/testresources) in a project that uses trial as its test runner, and ran into some problems.
The testresources package is designed to speed up test runs by allowing test cases to share a resource, reducing the number of times the resource needs to be set up and torn down.
It does this through the use of a special TestCase subclass and special TestSuite subclass. Each of these classes can work independently in a degraded manner (resources are set up and torn down for each test case), but when used together it will reorder the tests to reduce the number of times resources are set up and torn down.
This works fine with standard test runners, but not with trial. Trial's test runner pokes inside the test suite and replaces all the test cases with _PyUnitTestCaseAdapter instances, which prevents testresources's test suite from optimising resource usage.
It would be nice if trial could do its stuff without screwing around with the tests in the suite.
Change History (16)
comment:2 Changed 6 years ago by jamesh
- Component changed from core to trial
- Owner changed from glyph to jml
comment:3 Changed 6 years ago by exarkun
- Resolution set to duplicate
- Status changed from new to closed
comment:9 Changed 6 years ago by exarkun
- Resolution duplicate deleted
- Status changed from closed to reopened