Skip to content

Commit

Permalink
test(api): Point out old opentrons.protocol_engine.state test conve…
Browse files Browse the repository at this point in the history
…ntions more consistently (#17018)
  • Loading branch information
SyntaxColoring authored Dec 4, 2024
1 parent 02a7bfa commit 57fbf35
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Addressable area state store tests.
DEPRECATED: Testing AddressableAreaStore independently of AddressableAreaView is no
longer helpful. Add new tests to test_addressable_area_state.py, where they can be
tested together.
longer helpful. Try to add new tests to test_addressable_area_state.py, where they can be
tested together, treating AddressableAreaState as a private implementation detail.
"""

import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Addressable area state view tests.
DEPRECATED: Testing AddressableAreaView independently of AddressableAreaStore is no
longer helpful. Add new tests to test_addressable_area_state.py, where they can be
tested together.
longer helpful. Try to add new tests to test_addressable_area_state.py, where they can be
tested together, treating AddressableAreaState as a private implementation detail.
"""

import inspect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Tests for CommandStore.
DEPRECATED: Testing CommandStore independently of CommandView is no longer helpful.
Add new tests to test_command_state.py, where they can be tested together.
Try to add new tests to test_command_state.py, where they can be tested together,
treating CommandState as a private implementation detail.
"""


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Tests for CommandView.
DEPRECATED: Testing CommandView independently of CommandStore is no longer helpful.
Add new tests to test_command_state.py, where they can be tested together.
Try to add new tests to test_command_state.py, where they can be tested together,
treating CommandState as a private implementation detail.
"""


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Labware state store tests."""
"""Labware state store tests.
DEPRECATED: Testing LabwareStore independently of LabwareView is no
longer helpful. Try to add new tests to test_labware_state.py, where they can be
tested together, treating LabwareState as a private implementation detail.
"""
from typing import Optional
from opentrons.protocol_engine.state import update_types
import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Labware state store tests."""
"""Labware state store tests.
DEPRECATED: Testing LabwareView independently of LabwareStore is no
longer helpful. Try to add new tests to test_labware_state.py, where they can be
tested together, treating LabwareState as a private implementation detail.
"""
import pytest
from datetime import datetime
from typing import Dict, Optional, cast, ContextManager, Any, Union, NamedTuple, List
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Liquid state store tests."""
"""Liquid state store tests.
DEPRECATED: Testing LiquidClassStore independently of LiquidClassView is no
longer helpful. Try to add new tests to test_liquid_class_state.py, where they can be
tested together, treating LiquidClassState as a private implementation detail.
"""
import pytest

from opentrons_shared_data.liquid_classes.liquid_class_definition import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Liquid view tests."""
"""Liquid view tests.
DEPRECATED: Testing LiquidClassView independently of LiquidClassStore is no
longer helpful. Try to add new tests to test_liquid_class_state.py, where they can be
tested together, treating LiquidClassState as a private implementation detail.
"""
import pytest

from opentrons_shared_data.liquid_classes.liquid_class_definition import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Liquid state store tests."""
"""Liquid state store tests.
DEPRECATED: Testing LiquidStore independently of LiquidView is no longer helpful.
Try to add new tests to test_liquid_state.py, where they can be tested together,
treating LiquidState as a private implementation detail.
"""
import pytest
from opentrons.protocol_engine.state.liquids import LiquidStore
from opentrons.protocol_engine import Liquid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Liquid view tests."""
"""Liquid view tests.
DEPRECATED: Testing LiquidView independently of LiquidStore is no longer helpful.
Try to add new tests to test_liquid_state.py, where they can be tested together,
treating LiquidState as a private implementation detail.
"""
import pytest

from opentrons.protocol_engine.state.liquids import LiquidState, LiquidView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Module state store tests."""
"""Module state store tests.
DEPRECATED: Testing ModuleStore independently of ModuleView is no longer helpful.
Try to add new tests to test_module_state.py, where they can be tested together,
treating ModuleState as a private implementation detail.
"""
from typing import List, Set, cast, Dict, Optional

import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Tests for module state accessors in the protocol engine state store."""
"""Tests for module state accessors in the protocol engine state store.
DEPRECATED: Testing ModuleView independently of ModuleView is no longer helpful.
Try to add new tests to test_module_state.py, where they can be tested together,
treating ModuleState as a private implementation detail.
"""
import pytest
from math import isclose
from pytest_lazyfixture import lazy_fixture # type: ignore[import-untyped]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Tests for pipette state changes in the protocol_engine state store."""
"""Tests for pipette state changes in the protocol_engine state store.
DEPRECATED: Testing PipetteStore independently of PipetteView is no longer helpful.
Try to add new tests to test_pipette_state.py, where they can be tested together,
treating PipetteState as a private implementation detail.
"""
import pytest

from opentrons_shared_data.pipette.types import PipetteNameType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Tests for pipette state accessors in the protocol_engine state store."""
"""Tests for pipette state accessors in the protocol_engine state store.
DEPRECATED: Testing PipetteView independently of PipetteStore is no longer helpful.
Try to add new tests to test_pipette_state.py, where they can be tested together,
treating PipetteState as a private implementation detail.
"""

from collections import OrderedDict
from typing import cast, Dict, List, Optional, Tuple, NamedTuple
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Well state store tests."""
"""Well state store tests.
DEPRECATED: Testing WellStore independently of WellView is no longer helpful.
Try to add new tests to well_state.py, where they can be tested together,
treating WellState as a private implementation detail.
"""

import pytest
from datetime import datetime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Well view tests."""
"""Well view tests.
DEPRECATED: Testing WellView independently of WellStore is no longer helpful.
Try to add new tests to test_well_state.py, where they can be tested together,
treating WellState as a private implementation detail.
"""
from datetime import datetime
from opentrons.protocol_engine.types import (
LoadedVolumeInfo,
Expand Down

0 comments on commit 57fbf35

Please sign in to comment.