Re: [Python-Dev] isolating import state during tests

2012-04-21 Thread Brett Cannon
On Sat, Apr 21, 2012 at 21:02, Eric Snow wrote: > It looks like the test suite accommodates a stable import state to > some extent, but would it be worth having a PEP-405-esque context > manager to help with this? For example, something along these lines: > > > class ImportState: ># sys.modul

[Python-Dev] isolating import state during tests

2012-04-21 Thread Eric Snow
It looks like the test suite accommodates a stable import state to some extent, but would it be worth having a PEP-405-esque context manager to help with this? For example, something along these lines: class ImportState: # sys.modules is part of the interpreter state, so # repopulate (do