Codebase list python-procrunner / 26b1626
Add system test for procrunner Markus Gerstel 6 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 from __future__ import absolute_import, division, print_function
1
2 import procrunner
3 import os
4
5 def test_simple_command_invocation():
6 if os.name == 'nt':
7 command = ['cmd.exe', '/c', 'echo', 'hello']
8 else:
9 command = ['echo', 'hello']
10
11 result = procrunner.run(command)
12
13 assert result['exitcode'] == 0
14 assert result['stdout'].strip() == 'hello'
15 assert result['stderr'] == ''