From: Zac Medico Date: Sat, 7 Aug 2010 00:34:09 +0000 (-0700) Subject: Use ResolverPlayground for it's config instance, so that we don't X-Git-Tag: v2.2_rc68~369 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=67797d2ed2914b5eb805e096904fd34ace78f74f;p=portage.git Use ResolverPlayground for it's config instance, so that we don't instantiate portage.settings. --- diff --git a/pym/portage/tests/ebuild/test_spawn.py b/pym/portage/tests/ebuild/test_spawn.py index f37a0c5a3..bb9fb2623 100644 --- a/pym/portage/tests/ebuild/test_spawn.py +++ b/pym/portage/tests/ebuild/test_spawn.py @@ -4,16 +4,19 @@ import codecs import errno import sys +from tempfile import mkstemp from portage import os from portage import _encodings from portage import _unicode_encode +from portage import spawn from portage.tests import TestCase +from portage.tests.resolver.ResolverPlayground import ResolverPlayground class SpawnTestCase(TestCase): def testLogfile(self): - from portage import settings, spawn - from tempfile import mkstemp + playground = ResolverPlayground() + settings = playground.settings logfile = None try: fd, logfile = mkstemp() @@ -42,6 +45,7 @@ class SpawnTestCase(TestCase): # may occur. self.assertEqual(test_string, log_content) finally: + playground.cleanup() if logfile: try: os.unlink(logfile)