I am currently testing a Click CLI application and get result.exit_code == 2
. Why does that happen?
This appears to indicate a usage error:
An internal exception that signals a usage error. This typically aborts any further handling.
This is consistent with Click's own tests, e.g.