From: Zac Medico Date: Sun, 5 Sep 2010 19:28:17 +0000 (-0700) Subject: Make SpawnTestCase use a PollScheduler instance directly since X-Git-Tag: v2.2_rc76~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=576d32d2c859e8f3012bbab6e666b870ba88c5a1;p=portage.git Make SpawnTestCase use a PollScheduler instance directly since TaskScheduler isn't really needed. --- 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'),