Skip to content

Commit 1a5437c

Browse files
committed
fix
1 parent ad703da commit 1a5437c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/test_scripts.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ def test_do_commands_exist(self):
3737
try:
3838
subprocess.check_output(command.split(), stderr=subprocess.STDOUT)
3939
except subprocess.CalledProcessError as e:
40-
error_code = e.returncode
40+
return_code = e.returncode
41+
output = e.output
4142
else:
42-
error_code = 0
43+
return_code = 0
44+
output = "-- NO OUTPUT --"
4345

4446
allowed = [0, errno.EINVAL]
45-
self.assertIn(error_code, allowed,
47+
self.assertIn(return_code, allowed,
4648
'Calling "{}" failed (exit code was {} and not SUCCESS/0 or EINVAL/22):\n{}'
47-
.format(command, e.returncode, e.output))
49+
.format(command, return_code, output))
4850

4951
def test_does_not_crash(self):
5052
# test import

0 commit comments

Comments
 (0)