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
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 EnvironmentFixt ure("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