Add CLI-level test for import pipeline error handling in Bitbucket integration#1085
Conversation
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
nathanjmcdougall
left a comment
There was a problem hiding this comment.
@copilot this test is testing at the wrong level. It should be in a different file, the one that tests with CLIRunner on the usethis ci bitbucket command. And you should test that the error does NOT propogate, i.e. that it does not get raised.
Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Moved the test to |
CodSpeed Performance ReportMerging #1085 will not alter performanceComparing Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The issue raised concern that
UnexpectedImportPipelineErrorcould propagate unnecessarily to users when tools callupdate_bitbucket_steps(), which internally usesadd_bitbucket_step_in_default().Changes
test_import_pipeline_error_handledintests/usethis/_ui/interface/test_interface_ci.pyto verify the CLI handles import pipeline errors gracefullyThe test uses
CliRunnerto test theusethis ci bitbucketcommand and ensures the error does NOT propagate as an unhandled exception:This validates that the CLI layer properly catches
UnexpectedImportPipelineError, displays an error message to the user, and exits gracefully with code 1 instead of propagating an unhandled exception.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.