Skip to content

Commit

Permalink
make callback a callable for test to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
matt authored and matt committed Oct 23, 2023
1 parent 6182c73 commit b12f46f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/unit_tests/lcls_tools/common/devices/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,15 @@ def mock_callback(message: str) -> None:
print(f"callback: {message}")

# Add different callbacks to Device
first_callback = mock_callback("first")
second_callback = mock_callback("second")
third_callback = mock_callback("third")
def first_callback():
mock_callback("first")

def second_callback():
mock_callback("second")

def third_callback():
mock_callback("third")

self.device.add_callback_to_pv(
"bact",
first_callback,
Expand Down

0 comments on commit b12f46f

Please sign in to comment.