We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 254a9fb commit 8d5d657Copy full SHA for 8d5d657
1 file changed
tests/test_cli.py
@@ -9,8 +9,10 @@
9
10
11
def assert_command_output(command, expected_output):
12
- output = subprocess.check_output(command, shell=True).decode("utf-8").strip()
13
- # normalize line endings for cross-platform compatibility
+ try:
+ output = subprocess.check_output(command, shell=True).decode("utf-8").strip()
14
+ except subprocess.CalledProcessError as error:
15
+ output = error.output.decode("utf-8").strip()
16
output = output.replace("\r\n", "\n").strip()
17
assert output == expected_output.replace("\r\n", "\n").strip()
18
return output
0 commit comments