First cut of chain tests

This commit is contained in:
Harry
2014-11-04 10:03:29 +00:00
parent cadd1112d6
commit d00704e46b
+18
View File
@@ -0,0 +1,18 @@
import os
from procs import Process
TEST_DIR = os.path.abspath(os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'test_data'
))
def test_chained_procs():
ls = Process('ls')
grep = Process('grep 2')
chain = ls | grep
chain.run()
assert chain.returncode == 0
assert chain.stdout == 'file2'