Message57422
| Author |
gvanrossum |
| Recipients |
christian.heimes, gvanrossum |
| Date |
2007年11月12日.19:47:38 |
| SpamBayes Score |
0.0090438835 |
| Marked as misclassified |
No |
| Message-id |
<ca471dc20711121147r1a9272a5o8f0334c69347f413@mail.gmail.com> |
| In-reply-to |
<1194894875.63.0.0908101332141.issue1414@psf.upfronthosting.co.za> |
| Content |
If that makes the test pass with and without -R::, go for it!
On Nov 12, 2007 11:14 AM, Christian Heimes <report@bugs.python.org> 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 <report@bugs.python.org>
> <http://bugs.python.org/issue1414>
> __________________________________
> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年11月12日 19:47:38 | gvanrossum | set | spambayes_score: 0.00904388 -> 0.0090438835 recipients:
+ gvanrossum, christian.heimes |
| 2007年11月12日 19:47:38 | gvanrossum | link | issue1414 messages |
| 2007年11月12日 19:47:38 | gvanrossum | create |
|