Commit beed7309 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

[click] Account for cases when exception is None in click results

parent 54f6c279
Pipeline #26009 passed with stage
in 17 minutes and 8 seconds
......@@ -395,9 +395,9 @@ def assert_click_runner_result(result, exit_code=0):
"""Helper for asserting click runner results"""
m = ("Click command exited with code `{}' and exception:\n{}"
"\nThe output was:\n{}")
m = m.format(
result.exit_code, ''.join(traceback.format_exception(*result.exc_info)),
exception = 'None' if result.exc_info is None else \
m = m.format(result.exit_code, exception, result.output)
assert result.exit_code == exit_code, m
if exit_code == 0:
assert not result.exception, m
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment