summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-05 12:28:17 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-05 12:28:17 -0700
commit576d32d2c859e8f3012bbab6e666b870ba88c5a1 (patch)
treecc86d6064b26b82cdcd02b4af67adeb8de52c0dd
parentd4f0fba6d7a057358a3cfffc216108e6ca3aa53d (diff)
downloadportage-576d32d2c859e8f3012bbab6e666b870ba88c5a1.tar.gz
portage-576d32d2c859e8f3012bbab6e666b870ba88c5a1.tar.bz2
portage-576d32d2c859e8f3012bbab6e666b870ba88c5a1.zip
Make SpawnTestCase use a PollScheduler instance directly since
TaskScheduler isn't really needed.
-rw-r--r--pym/portage/tests/ebuild/test_spawn.py10
1 files 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'),