c89c3d20ca8b58fc708ffd5d68c9e8978d7cfbfa,unittests/model_tests/neuron/test_neural_parameter.py,,test_range_list,#,42
Before Change
def test_range_list():
MockSimulator().setup()
spec_writer = FileDataWriter("test.dat")
spec = DataSpecificationGenerator(spec_writer, None)
try:
value = SpynnakerRangedList(size=10, value=1.0, key="test")
value[2:4] = 2.0
param = NeuronParameter(value, DataType.S1615)
After Change
def test_range_list():
MockSimulator().setup()
with tempfile.NamedTemporaryFile() as temp:
spec = DataSpecificationGenerator(FileDataWriter(temp.name), None)
try:
value = SpynnakerRangedList(size=10, value=1.0, key="test")
value[2:4] = 2.0
param = NeuronParameter(value, DataType.S1615)
iterator = param.iterator_by_slice(0, 5, spec)
values = _iterate_parameter_values(iterator, DataType.S1615)
assert list(value[0:5]) == values
assert isinstance(iterator, _Range_Iterator)
finally:
spec.end_specification()
def _generator(size):
for i in xrange(size):
yield i
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 11
Instances
Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: c89c3d20ca8b58fc708ffd5d68c9e8978d7cfbfa
Time: 2019-07-25
Author: donal.k.fellows@manchester.ac.uk
File Name: unittests/model_tests/neuron/test_neural_parameter.py
Class Name:
Method Name: test_range_list
Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: c89c3d20ca8b58fc708ffd5d68c9e8978d7cfbfa
Time: 2019-07-25
Author: donal.k.fellows@manchester.ac.uk
File Name: unittests/model_tests/neuron/test_neural_parameter.py
Class Name:
Method Name: test_real_list
Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: c89c3d20ca8b58fc708ffd5d68c9e8978d7cfbfa
Time: 2019-07-25
Author: donal.k.fellows@manchester.ac.uk
File Name: unittests/model_tests/neuron/test_neural_parameter.py
Class Name:
Method Name: test_single_value
Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: c89c3d20ca8b58fc708ffd5d68c9e8978d7cfbfa
Time: 2019-07-25
Author: donal.k.fellows@manchester.ac.uk
File Name: unittests/model_tests/neuron/test_neural_parameter.py
Class Name:
Method Name: test_range_list_as_list