Adapter to turn "servers" into "resources"
Bug #504083 reported by
Jonathan Lange
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testresources |
Fix Released
|
Wishlist
|
Robert Collins |
Bug Description
A lot of the "resources" that I need to use in tests have a common pattern. They are objects with setUp and tearDown methods, like the 'Server' objects used in Bazaar.
To spare me from writing a lot of boilerplate like this...
class SomeResource(
"""A resource that provides a working couchdb instance."""
def make(self, dependency_
result = DesktopCouchTes
return result
def clean(self, instance):
It would be nice if testresources had some sort of convenience method.
Related branches
lp:~lifeless/testresources/usability
- testresources developers: Pending requested
-
Diff: 143 lines (+107/-0)3 files modifiedNEWS (+3/-0)
lib/testresources/__init__.py (+44/-0)
lib/testresources/tests/test_test_resource.py (+60/-0)
To post a comment you must log in.
Perhaps:
server = DesktopCouchTes tInstance( **dependency_ resources) (server. setUp, server.tearDown))]
resources = [('couchdb', GenericResource