test(api): delete protocol_api_old/test_context.py?#18412
Merged
Conversation
sfoster1
approved these changes
May 22, 2025
Member
sfoster1
left a comment
There was a problem hiding this comment.
go for it imo. i think it is because we wanted to refresh the tests but keep the old ones just in case, IMO it's no longer useful
SyntaxColoring
approved these changes
May 22, 2025
ddcc4
added a commit
that referenced
this pull request
May 22, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 23, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 24, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 24, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 29, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 29, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
ddcc4
added a commit
that referenced
this pull request
May 29, 2025
# Overview
Is this a good idea??!?
`protocol_api_old/test_context.py` is an old test that monkeypatches
`aspirate()` and `dispense()` in a very particular way:
```
def fake_aspirate(
vol: Optional[float] = None,
loc: Optional[Location] = None,
rate: Optional[int] = None,
)
```
These argument names, default values, and number of arguments do not
match the current API at all. That means that to make the test pass, we
have to call `aspirate()` and `dispense()` with positional arguments
(not named arguments), and `instrument_context.py` has to avoid calling
`aspirate()`/`dispense()` with any of our new arguments that are not
available in the fake (like `push_out` or `flow_rate`).
I thought we couldn't change the test because it's enforcing some
ancient API behavior that we have to support. But @jbleon95 and
@SyntaxColoring think the whole test might be redundant now, so maybe we
can just delete it?
## Review requests
I'd like feedback from anyone who knows what `protocol_api_old` is, and
what the purpose of `protocol_api_old/test_context.py` is.
## Risk assessment
A test-only change.
(cherry picked from commit 9d7aa9f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Is this a good idea??!?
protocol_api_old/test_context.pyis an old test that monkeypatchesaspirate()anddispense()in a very particular way:These argument names, default values, and number of arguments do not match the current API at all. That means that to make the test pass, we have to call
aspirate()anddispense()with positional arguments (not named arguments), andinstrument_context.pyhas to avoid callingaspirate()/dispense()with any of our new arguments that are not available in the fake (likepush_outorflow_rate).I thought we couldn't change the test because it's enforcing some ancient API behavior that we have to support. But @jbleon95 and @SyntaxColoring think the whole test might be redundant now, so maybe we can just delete it?
Review requests
I'd like feedback from anyone who knows what
protocol_api_oldis, and what the purpose ofprotocol_api_old/test_context.pyis.Risk assessment
A test-only change.