Merge lp:~free.ekanayaka/python-fixtures/reusable-fixture into lp:~python-fixtures/python-fixtures/trunk
Proposed by
Free Ekanayaka
Status: | Needs review |
---|---|
Proposed branch: | lp:~free.ekanayaka/python-fixtures/reusable-fixture |
Merge into: | lp:~python-fixtures/python-fixtures/trunk |
Diff against target: |
155 lines (+110/-0) 4 files modified
lib/fixtures/__init__.py (+2/-0) lib/fixtures/_fixtures/__init__.py (+2/-0) lib/fixtures/_fixtures/reusable.py (+45/-0) lib/fixtures/tests/_fixtures/test_reusable.py (+61/-0) |
To merge this branch: | bzr merge lp:~free.ekanayaka/python-fixtures/reusable-fixture |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
python-fixtures committers | Pending | ||
Review via email: mp+171503@code.launchpad.net |
Description of the change
This an idea that came out from this MP:
https:/
you might want to read it for the full background.
In a nutshell: in case an expensive fixture can be re-used across different tests, projects can wrap it with ReusableFixture and have it setup/cleaned-up only once.
I've tried to understand if this could be done somehow with testresources (perhaps with the reset() method), but I couldn't figure that out. Comments are welcome.
To post a comment you must log in.
Unmerged revisions
- 68. By Free Ekanayaka
-
Add ReusableFixture
Hi, this is interesting.
So, testresources is aimed at this, grab me on IRC and I can debug
what's not working for you. If you're seeing setup/teardowns, you
don't have the optimiser working properly.
That said, we can do this thing you've got here, and I'll give it a
full review this week.
-Rob