Skip to content

test(api): delete protocol_api_old/test_context.py?#18412

Merged
ddcc4 merged 1 commit into
edgefrom
dc-del-old-test_context
May 22, 2025
Merged

test(api): delete protocol_api_old/test_context.py?#18412
ddcc4 merged 1 commit into
edgefrom
dc-del-old-test_context

Conversation

@ddcc4
Copy link
Copy Markdown
Contributor

@ddcc4 ddcc4 commented May 21, 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.

@ddcc4 ddcc4 requested review from SyntaxColoring and jbleon95 May 21, 2025 21:38
@ddcc4 ddcc4 requested a review from a team as a code owner May 21, 2025 21:38
Copy link
Copy Markdown
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.

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

Copy link
Copy Markdown
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Agreed. Nuke it.

Thank you!

@ddcc4 ddcc4 merged commit 9d7aa9f into edge May 22, 2025
30 checks passed
@ddcc4 ddcc4 deleted the dc-del-old-test_context branch May 22, 2025 18:18
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)
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.

3 participants