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

Refactor how SMuRF operations are called #108

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

BrianJKoopman
Copy link
Member

This PR contains the following:

  1. Introduces smurf._run_op(), which provides a convenient way to call any given task in the pysmurf controllers.
  2. Expands the way the mocked smurf clients were constructed -- all SMuRF operations now need their own Mock object due to the construction in smurf._run_op().
  3. Moves the mocked clients function to tests/util.py, since several tests are implementing the same thing. Future tests should use this as the "one true mock".
  4. Updates the CLIENTS list patch to patch it directly, rather than patching the create_clients() function (which still then requires an initialize() is run in every test). This matches the way the wiregrid module patches.

This is in advance of work on #94, which requires adding error handling within _run_op().

@BrianJKoopman BrianJKoopman merged commit 0734f8f into main Dec 7, 2023
4 checks passed
@BrianJKoopman BrianJKoopman deleted the koopman/refactor-smurf-commands branch December 7, 2023 22:10
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.

1 participant