I have a function like this:
def test_readout(self, nr_triggers=10, dump_data=False, lanes=range(9)):
Which is to be called by command line using the fire python module, via a master file called testbench.py. I want to set the parameter lanes to an array with a single value, 8 specifically.
The closest I've gotten is this:
mypython3 ./testbench.py test_readout 10 False [8,8]
This works, but as you can see the array has two duplicate entries for 8 instead of just one. But if I just do:
mypython3 ./testbench.py test_readout 10 False [8]
Then I get this error:
[...]
File "./testbench.py", line 323, in test_readout
[trig == nr_triggers for trig in event_counters])
TypeError: 'int' object is not iterable
Other strategies like leaving the other parameters at default and setting lanes explicitly like:
mypython3 ./testbench.py test_readout --lanes [8]
Gives this kind of error:
[...]
File "./testbench.py", line 306, in test_readout
for i in range(nr_triggers):
TypeError: 'str' object cannot be interpreted as an integer
Anyone know the correct way of doing this?