yandex-tank/Tests/ShellExecPluginTest.py
Andrey Pohilko a31849c6c5 Pylint warnings
Locking functionality pushed down to Core
2012-10-08 18:54:31 +04:00

32 lines
848 B
Python

from Tank.Plugins.ShellExec import ShellExecPlugin
from Tests.TankTests import TankTestCase
import logging
import select
import subprocess
import tempfile
import unittest
class ShellExecPluginTestCase(TankTestCase):
def setUp(self):
core = self.get_core()
core.load_configs(['config/shellexec.conf'])
self.foo = ShellExecPlugin(core)
def tearDown(self):
del self.foo
self.foo = None
def test_run(self):
self.foo.configure()
self.foo.prepare_test()
self.foo.start_test()
self.foo.end_test(0)
def test_select(self):
pipes = subprocess.Popen(["pwd"], stdout=subprocess.PIPE)
r, w, x = select.select([pipes.stdout], [], [], 1)
logging.info("selected: %s %s %s", r, w, x)
if __name__ == '__main__':
unittest.main()