Skip to content

Commit c40da1c

Browse files
committed
Add mock docstrings
1 parent 9ae8d76 commit c40da1c

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

tests/test_misc.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,45 @@ class ModuleItem:
88
"""Mock for the org.scijava.module.ModuleItem interface."""
99

1010
def __init__(self, input_name):
11+
"""ModuleItem constructor.
12+
13+
Parameters
14+
----------
15+
input_name : str
16+
FIXME: describe (see the ScriptModule class)
17+
"""
1118
self.input_name = input_name
1219

1320
def getName(self):
21+
"""Getter method for the "input_name" attribute.
22+
23+
Returns
24+
-------
25+
str
26+
"""
1427
return self.input_name
1528

1629

1730
class ScriptInfo:
1831
"""Mock for the org.scijava.script.ScriptInfo class."""
1932

2033
def __init__(self, input_names):
34+
"""ScriptInfo constructor.
35+
36+
Parameters
37+
----------
38+
input_names : list(str)
39+
FIXME: describe (see the ScriptModule class)
40+
"""
2141
self.input_names = [ModuleItem(x) for x in input_names]
2242

2343
def inputs(self):
44+
"""Get the list of input-objects.
45+
46+
Returns
47+
-------
48+
list(ModuleItem)
49+
"""
2450
return self.input_names
2551

2652

@@ -34,17 +60,29 @@ def __init__(self, input_names, inputs):
3460
----------
3561
input_names : list(str)
3662
The list of input names. FIXME: explain better.
37-
inputs :dict
63+
inputs : dict
3864
A dict having the `input_names` as keys. Values are representing the
3965
content of the respective script parameter.
4066
"""
4167
self.info = ScriptInfo(input_names)
4268
self.inputs = inputs
4369

4470
def getInfo(self):
71+
"""Getter method for the "info" attribute.
72+
73+
Returns
74+
-------
75+
ScriptInfo
76+
"""
4577
return self.info
4678

4779
def getInputs(self):
80+
"""Getter method for the "inputs" attribute.
81+
82+
Returns
83+
-------
84+
dict
85+
"""
4886
return self.inputs
4987

5088

0 commit comments

Comments
 (0)