From 65e87461b4573fc26237d87dd49f6da1c6b56823 Mon Sep 17 00:00:00 2001 From: Brian Koopman Date: Fri, 8 Dec 2023 15:32:19 -0500 Subject: [PATCH] Add kwargs passthrough to iv_curve() --- src/sorunlib/smurf.py | 7 +++++-- tests/test_smurf.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sorunlib/smurf.py b/src/sorunlib/smurf.py index 2a8c7dc..a5eee6a 100644 --- a/src/sorunlib/smurf.py +++ b/src/sorunlib/smurf.py @@ -134,12 +134,14 @@ def bias_step(tag=None, concurrent=True, settling_time=None): tag=tag) -def iv_curve(tag=None, concurrent=True, settling_time=None): +def iv_curve(tag=None, iv_kwargs=None, concurrent=True, settling_time=None): """Perform an iv curve on all SMuRF Controllers. Args: tag (str, optional): Tag or comma-separated listed of tags to attach to the operation. + iv_kwargs (dict, optional): Additional keyword arguments to pass to + ``take_iv``. concurrent (bool, optional): A bool which determines how the operation is run across the active SMuRF controllers. It runs in parallel if True, and in series if False. @@ -153,7 +155,8 @@ def iv_curve(tag=None, concurrent=True, settling_time=None): _run_op('take_iv', concurrent=concurrent, settling_time=settling_time, - tag=tag) + tag=tag, + kwargs=iv_kwargs) def uxm_setup(concurrent=True, settling_time=0): diff --git a/tests/test_smurf.py b/tests/test_smurf.py index d93088b..88d9d03 100644 --- a/tests/test_smurf.py +++ b/tests/test_smurf.py @@ -63,7 +63,7 @@ def test_bias_step_failure_threshold(concurrent): def test_iv_curve(concurrent): smurf.iv_curve(concurrent=concurrent) for client in smurf.run.CLIENTS['smurf']: - client.take_iv.start.assert_called_with(tag=None) + client.take_iv.start.assert_called_with(tag=None, kwargs=None) @patch('sorunlib.smurf.time.sleep', MagicMock())