From 576d32d2c859e8f3012bbab6e666b870ba88c5a1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 5 Sep 2010 12:28:17 -0700 Subject: [PATCH] Make SpawnTestCase use a PollScheduler instance directly since TaskScheduler isn't really needed. --- pym/portage/tests/ebuild/test_spawn.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pym/portage/tests/ebuild/test_spawn.py b/pym/portage/tests/ebuild/test_spawn.py index c760af82a..d3fb21f8b 100644 --- a/pym/portage/tests/ebuild/test_spawn.py +++ b/pym/portage/tests/ebuild/test_spawn.py @@ -11,7 +11,7 @@ from portage import _unicode_encode from portage.const import BASH_BINARY from portage.tests import TestCase from _emerge.SpawnProcess import SpawnProcess -from _emerge.TaskScheduler import TaskScheduler +from _emerge.PollScheduler import PollScheduler class SpawnTestCase(TestCase): @@ -22,15 +22,15 @@ class SpawnTestCase(TestCase): os.close(fd) null_fd = os.open('/dev/null', os.O_RDWR) test_string = 2 * "blah blah blah\n" - task_scheduler = TaskScheduler() + scheduler = PollScheduler().sched_iface proc = SpawnProcess( args=[BASH_BINARY, "-c", "echo -n '%s'" % test_string], env={}, fd_pipes={0:sys.stdin.fileno(), 1:null_fd, 2:null_fd}, - scheduler=task_scheduler.sched_iface, + scheduler=scheduler, logfile=logfile) - task_scheduler.add(proc) - task_scheduler.run() + proc.start() + proc.wait() os.close(null_fd) f = codecs.open(_unicode_encode(logfile, encoding=_encodings['fs'], errors='strict'), -- 2.26.2