Comment 1 for bug 1221724

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

Sorry, I can't quite make heads or tails of that.

Do you mean:

"I want to be able to use a Fixture as a context manager" ? If so - you can e.g.:

with EnvironmentFixture("Foo"):
    do_stuff_here()

Or do you mean you have a context manager 'mgr' and you want to use that as a fixture - like

self.useFixture(ContextFixture(mgr)) ? # ContextFixture is made up