summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-05 12:46:33 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-05 12:46:33 -0700
commitbcbfc8fd20da6b8c7d07892210d45df883a4c58e (patch)
tree1338ba1cac8ffb5dc8d7b616703af3c7693b480e
parent77acf23e64a53438218a5eb44a190f6d0e13c331 (diff)
downloadportage-bcbfc8fd20da6b8c7d07892210d45df883a4c58e.tar.gz
portage-bcbfc8fd20da6b8c7d07892210d45df883a4c58e.tar.bz2
portage-bcbfc8fd20da6b8c7d07892210d45df883a4c58e.zip
Make DoebuildSpawnTestCase use a PollScheduler instance directly since
TaskScheduler isn't really needed.
-rw-r--r--pym/portage/tests/ebuild/test_doebuild_spawn.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pym/portage/tests/ebuild/test_doebuild_spawn.py b/pym/portage/tests/ebuild/test_doebuild_spawn.py
index c8a8095d3..ed08b2a1f 100644
--- a/pym/portage/tests/ebuild/test_doebuild_spawn.py
+++ b/pym/portage/tests/ebuild/test_doebuild_spawn.py
@@ -12,7 +12,7 @@ from portage.tests.resolver.ResolverPlayground import ResolverPlayground
from _emerge.EbuildPhase import EbuildPhase
from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
from _emerge.Package import Package
-from _emerge.TaskScheduler import TaskScheduler
+from _emerge.PollScheduler import PollScheduler
class DoebuildSpawnTestCase(TestCase):
"""
@@ -52,7 +52,7 @@ class DoebuildSpawnTestCase(TestCase):
# has been sourced already.
open(os.path.join(settings['T'], 'environment'), 'wb')
- task_scheduler = TaskScheduler()
+ scheduler = PollScheduler().sched_iface
for phase in ('_internal_test',):
# Test EbuildSpawnProcess by calling doebuild.spawn() with
@@ -66,17 +66,17 @@ class DoebuildSpawnTestCase(TestCase):
self.assertEqual(rval, os.EX_OK)
ebuild_phase = EbuildPhase(background=False,
- phase=phase, scheduler=task_scheduler.sched_iface,
+ phase=phase, scheduler=scheduler,
settings=settings)
- task_scheduler.add(ebuild_phase)
- task_scheduler.run()
+ ebuild_phase.start()
+ ebuild_phase.wait()
self.assertEqual(ebuild_phase.returncode, os.EX_OK)
ebuild_phase = MiscFunctionsProcess(background=False,
commands=['success_hooks'],
- scheduler=task_scheduler.sched_iface, settings=settings)
- task_scheduler.add(ebuild_phase)
- task_scheduler.run()
+ scheduler=scheduler, settings=settings)
+ ebuild_phase.start()
+ ebuild_phase.wait()
self.assertEqual(ebuild_phase.returncode, os.EX_OK)
finally:
playground.cleanup()