Per-test decorator syntax for test runner

Bug #657780 reported by Jonathan Lange
6
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_runner(DeferredRunTest)
    def test_deferred(self):
      return defer.succeed(None)
}}}

Spelling can vary.

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

This would be nice at many scopes:
 - test
 - class
 - module [perhaps spelt via load_tests at this scope]
 - testscenarios

Changed in testtools:
status: New → Triaged
importance: Undecided → Wishlist
Jonathan Lange (jml)
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 report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.