From 0bd76ffb46f95a81f340ae58b06fd187784d9e60 Mon Sep 17 00:00:00 2001 From: tamarzanzouri Date: Fri, 9 Feb 2024 13:25:37 -0500 Subject: [PATCH] Revert "fixed tests" This reverts commit 3324fb3aa4f74a1da4db892f46ac800a3f191a4a. --- api/src/opentrons/protocol_engine/state/commands.py | 6 +++--- .../opentrons/protocol_engine/state/test_command_view.py | 1 - notify-server/pyproject.toml | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 notify-server/pyproject.toml diff --git a/api/src/opentrons/protocol_engine/state/commands.py b/api/src/opentrons/protocol_engine/state/commands.py index 0f8d945f60f..4ddf2a90384 100644 --- a/api/src/opentrons/protocol_engine/state/commands.py +++ b/api/src/opentrons/protocol_engine/state/commands.py @@ -273,7 +273,7 @@ def handle_action(self, action: Action) -> None: # noqa: C901 error=action.error, ) prev_entry = self._state.commands_by_id[action.command_id] - failed_command_entry = CommandEntry( + self._state.commands_by_id[action.command_id] = CommandEntry( index=prev_entry.index, # TODO(mc, 2022-06-06): add new "cancelled" status or similar # and don't set `completedAt` in commands other than the @@ -286,8 +286,8 @@ def handle_action(self, action: Action) -> None: # noqa: C901 } ), ) - self._state.commands_by_id[action.command_id] = failed_command_entry - self._state.failed_command = failed_command_entry + + self._state.failed_command = prev_entry if prev_entry.command.intent == CommandIntent.SETUP: other_command_ids_to_fail = [ *[i for i in self._state.queued_setup_command_ids], diff --git a/api/tests/opentrons/protocol_engine/state/test_command_view.py b/api/tests/opentrons/protocol_engine/state/test_command_view.py index 10bb733c610..c6a8d5b1f89 100644 --- a/api/tests/opentrons/protocol_engine/state/test_command_view.py +++ b/api/tests/opentrons/protocol_engine/state/test_command_view.py @@ -816,7 +816,6 @@ def test_get_slice_default_cursor_failed_command() -> None: subject = get_command_view( commands=[command_1, command_2, command_3, command_4], run_result=RunResult.FAILED, - failed_command=CommandEntry(index=2, command=command_3), ) result = subject.get_slice(cursor=None, length=3) diff --git a/notify-server/pyproject.toml b/notify-server/pyproject.toml deleted file mode 100644 index b0471b7f6a8..00000000000 --- a/notify-server/pyproject.toml +++ /dev/null @@ -1,3 +0,0 @@ -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file