This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients christian.heimes, gvanrossum
Date 2007-11-12.19:47:38
SpamBayes Score 0.0090438835
Marked as misclassified No
Message-id <[email protected]>
In-reply-to <[email protected]>
Content
If that makes the test pass with and without -R::, go for it!

On Nov 12, 2007 11:14 AM, Christian Heimes <[email protected]> wrote:
>
> Christian Heimes added the comment:
>
> How do you like;
>
> class TestPkg(unittest.TestCase):
>
>     def setUp(self):
>         self.root = None
>         self.syspath = list(sys.path)
>         self.sysmodules = sys.modules.copy()
>
>     def tearDown(self):
>         sys.path[:] = self.syspath
>         sys.modules.clear()
>         sys.modules.update(self.sysmodules)
>         del self.sysmodules
>         cleanout(self.root)
>
> Or I could use the paranoid approach: create set from sys.modules.keys()
> in setUp + tearDown and remove the items that are in the second set but
> not in the first set.
>
>
> __________________________________
> Tracker <[email protected]>
> <http://bugs.python.org/issue1414>
> __________________________________
>
History
Date User Action Args
2007-11-12 19:47:38gvanrossumsetspambayes_score: 0.00904388 -> 0.0090438835
recipients: + gvanrossum, christian.heimes
2007-11-12 19:47:38gvanrossumlinkissue1414 messages
2007-11-12 19:47:38gvanrossumcreate