Add system test for procrunner
Markus Gerstel
6 years ago
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'] == '' |