From 67797d2ed2914b5eb805e096904fd34ace78f74f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 6 Aug 2010 17:34:09 -0700 Subject: [PATCH] Use ResolverPlayground for it's config instance, so that we don't instantiate portage.settings. --- pym/portage/tests/ebuild/test_spawn.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.26.2