Skip to content

Commit 0bab55e

Browse files
committed
fix: address PR #9086 review feedback
- tests/apps/nnunet/test_nnunetv2_runner_command.py: add docstrings to _load_pickle and _warn test helpers Signed-off-by: R. Garcia-Dias <rafaelagd@gmail.com>
1 parent 23a4c86 commit 0bab55e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/apps/nnunet/test_nnunetv2_runner_command.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,24 @@ def test_postprocessing_pickle_warns_on_untrusted_file(self):
177177
events = []
178178

179179
def _load_pickle(path):
180+
"""Record a ``load_pickle`` call and return an empty postprocessing pipeline.
181+
182+
Args:
183+
path: path to the pickle file (unused).
184+
185+
Returns:
186+
A tuple of ``(postprocessing_fns, postprocessing_kwargs)``.
187+
"""
180188
events.append("load_pickle")
181189
return [], {}
182190

183191
def _warn(*args, **kwargs):
192+
"""Record a ``warnings.warn`` call.
193+
194+
Args:
195+
*args: positional arguments passed to ``warnings.warn``.
196+
**kwargs: keyword arguments passed to ``warnings.warn``.
197+
"""
184198
events.append("warn")
185199

186200
load_pickle = mock.MagicMock(side_effect=_load_pickle)

0 commit comments

Comments
 (0)