fix(app-testing): only specify labware that is used when running from tests #15508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Fixes https://opentrons.atlassian.net/browse/EXEC-582
I ran into an issue when adding PL protocols to snapshot testing.
We were passing all custom labware in the
labware
folder topython -m opentrons.cli.analyze
. Subsequently, when you add another custom labware, every protocol has the custom labware added to its command, meaning it ends up in the analysis. This causes every snapshot to need to be updated when you add a new custom labware.This PR slightly modifies how we build the
analyze
command when we usegenerate_analyses_from_test
. Instead of passing all of the custom labware, we only pass the custom labware that theProtocol
object specifies. Doing this ensures that adding a new custom labware does not every protocol to change.NOTE: The functionality of
analyze_against_image
is maintained as passing all the custom labware.Test Plan
generate_analyses.py
, add new custom labware to thelabware
folder. The added custom labware should not be specified in any of the ran protocolsgenerate_analyses.py
Review requests
None
Risk assessment
Low