From d00704e46bd75470f728516ff448df897e89de2f Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 4 Nov 2014 10:03:29 +0000 Subject: [PATCH] First cut of chain tests --- tests/test_chain.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/test_chain.py diff --git a/tests/test_chain.py b/tests/test_chain.py new file mode 100644 index 0000000..6ba5512 --- /dev/null +++ b/tests/test_chain.py @@ -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' +