Skip to content

Commit

Permalink
Rename soft_signal_r to soft_signal_r_and_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jsouter committed Apr 16, 2024
1 parent 4551237 commit b02299f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ophyd_async/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
set_sim_callback,
set_sim_put_proceeds,
set_sim_value,
soft_signal_r,
soft_signal_r_and_backend,
soft_signal_rw,
wait_for_value,
)
Expand Down Expand Up @@ -69,7 +69,7 @@
"SignalW",
"SignalRW",
"SignalX",
"soft_signal_r",
"soft_signal_r_and_backend",
"soft_signal_rw",
"observe_value",
"set_and_wait_for_value",
Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/core/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def soft_signal_rw(
return SignalRW(SimSignalBackend(datatype, f"sim://{source_prefix}:{name}"))


def soft_signal_r(
def soft_signal_r_and_backend(
datatype: Optional[Type[T]], name: str, source_prefix: str
) -> Tuple[SignalR[T], SimSignalBackend]:
"""Returns a tuple of a read-only Signal and its SimSignalBackend through
Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
set_and_wait_for_value,
set_sim_put_proceeds,
set_sim_value,
soft_signal_r,
soft_signal_r_and_backend,
soft_signal_rw,
wait_for_value,
)
Expand Down Expand Up @@ -126,12 +126,12 @@ async def test_set_and_wait_for_value():

@pytest.mark.parametrize(
"signal_method,signal_class",
[(soft_signal_r, SignalR), (soft_signal_rw, SignalRW)],
[(soft_signal_r_and_backend, SignalR), (soft_signal_rw, SignalRW)],
)
async def test_create_soft_signal(signal_method, signal_class):
TEST_PREFIX = "TEST-PREFIX"
SIGNAL_NAME = "SIGNAL"
if signal_method == soft_signal_r:
if signal_method == soft_signal_r_and_backend:
signal, backend = signal_method(str, SIGNAL_NAME, TEST_PREFIX)
elif signal_method == soft_signal_rw:
signal = signal_method(str, SIGNAL_NAME, TEST_PREFIX)
Expand Down

0 comments on commit b02299f

Please sign in to comment.