Chris Spencer
2017-03-10 02:37:28 UTC
What's the best way to save and restore env?
I'm trying to unittest some custom Fabric tasks, and I'm having a real
problem not-polluting the global env variable. I've tried things like:
tmp = env.copy()
...run test
env.clear()
env.update(tmp)
but I still get weird errors caused by left-over env keys from other tests.
I'm trying to unittest some custom Fabric tasks, and I'm having a real
problem not-polluting the global env variable. I've tried things like:
tmp = env.copy()
...run test
env.clear()
env.update(tmp)
but I still get weird errors caused by left-over env keys from other tests.