test(api): Point out old opentrons.protocol_engine.state
test conventions more consistently
#17018
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
opentrons.protocol_engine.state
has many pairs ofFooView
+FooStore
classes. Traditionally, we have tested each of those classes independently, in its own unit test file. Since at least #11705, we have wanted to move away from that pattern. We want to instead give each pair a single file and test them integrated together, treatingFooState
as a private implementation detail.However, that direction was not clearly marked in the code, so it has been easy to miss. For example,
AddressableAreaStore
/AddressableAreaView
,LiquidClassStore
/LiquidClassView
, andWellStore
/WellView
all follow the old pattern even though they're relatively new.This makes sure we point out the old convention everywhere it appears, by adding deprecation comments and appending
_old
to the filenames (done first in #14795).Test Plan and Hands on Testing
None needed.
Review requests
So far, I have not made a ticket for porting these tests because I haven't found it worthwhile to pursue it for its own sake. I think it's just a direction we should go in when we're adding new tests and new functionality. However, do we want that ticket? Maybe it's helpful to have one place describing the rationale, so the deprecation comments can link to it?
Risk assessment
No risk.