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

chore(api): further speed up ot3controller tests and add profiling #12132

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ opentrons = { editable = true, path = "." }
opentrons-hardware = { editable = true, path = "./../hardware" }
# specify typing-extensions explicitly to force lockfile inclusion on Python >= 3.8
typing-extensions = ">=4.0.0,<5"
pytest-profiling = "~=1.7.0"
# TODO(mc, 2022-03-31): upgrade sphinx, remove this subdep pin
jinja2 = ">=2.3,<3.1"
58 changes: 38 additions & 20 deletions api/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion api/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""
import pytest


# Options must be added at the root level for pytest to properly
# pick them up. Technically, the main conftest that we use in
# tests/opentrons is not the root level.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def mock_driver(mock_messenger: AsyncMock) -> AbstractCanDriver:

@pytest.fixture
def controller(mock_config: OT3Config, mock_driver: AbstractCanDriver) -> OT3Controller:
return OT3Controller(mock_config, mock_driver)
with mock.patch("opentrons.hardware_control.backends.ot3controller.OT3GPIO"):
yield OT3Controller(mock_config, mock_driver)


@pytest.fixture
Expand Down