Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(api): Point out old opentrons.protocol_engine.state test conventions more consistently #17018

Merged
merged 11 commits into from
Dec 4, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Dec 3, 2024

Overview

opentrons.protocol_engine.state has many pairs of FooView+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, treating FooState 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, and WellStore/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.

@SyntaxColoring SyntaxColoring requested a review from a team December 3, 2024 19:17
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner December 3, 2024 19:17
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

@SyntaxColoring SyntaxColoring merged commit 57fbf35 into edge Dec 4, 2024
36 checks passed
@SyntaxColoring SyntaxColoring deleted the test_file_names branch December 4, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants