Per-test decorator syntax for test runner
Bug #657780 reported by
Jonathan Lange
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
Wishlist
|
Jonathan Lange |
Bug Description
It would be really nice to be able to specify a test runner (e.g. RunTest) on a per-test basis using decorator syntax. That way tests with special running needs would not have to be split into separate classes. Ideally, this would not require the use of a special loader.
e.g.
{{{
class TestFoo(TestCase):
def test_normal(self):
pass
@use_
def test_deferred(
return defer.succeed(None)
}}}
Spelling can vary.
Related branches
lp:~jml/testtools/run-test-improvements
- Robert Collins: Approve
-
Diff: 390 lines (+219/-23)6 files modifiedMANUAL (+35/-10)
NEWS (+6/-0)
testtools/__init__.py (+2/-0)
testtools/testcase.py (+59/-11)
testtools/tests/test_runtest.py (+115/-0)
testtools/tests/test_testresult.py (+2/-2)
Changed in testtools: | |
status: | Triaged → In Progress |
assignee: | nobody → Jonathan Lange (jml) |
milestone: | none → next |
status: | In Progress → Fix Committed |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This would be nice at many scopes:
- test
- class
- module [perhaps spelt via load_tests at this scope]
- testscenarios