7bb022dcab3d93c953dcd8901bc717be4da2444f,brian2/tests/test_spikegenerator.py,,test_spikegenerator_incorrect_period,#,225

Before Change


                                                          period=-1*ms))

    // Period is smaller than the highest spike time
    assert_raises(ValueError, lambda: SpikeGeneratorGroup(1, [0], [2]*ms,
                                                          period=1*ms))
    // Period is not an integer multiple of dt
    SG = SpikeGeneratorGroup(1, [], []*second, period=1.25*ms, dt=0.1*ms)
    net = Network(SG)
    assert_raises(NotImplementedError, lambda: net.run(0*ms))

After Change


    inconsistent period and dt arguments.
    """
    // Period is negative
    with pytest.raises(ValueError):
        SpikeGeneratorGroup(1, [], []*second, period=-1*ms)

    // Period is smaller than the highest spike time
    with pytest.raises(ValueError):
        SpikeGeneratorGroup(1, [0], [2]*ms, period=1*ms)
    // Period is not an integer multiple of dt
    SG = SpikeGeneratorGroup(1, [], []*second, period=1.25*ms, dt=0.1*ms)
    net = Network(SG)
    with pytest.raises(NotImplementedError):
        net.run(0*ms)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: brian-team/brian2
Commit Name: 7bb022dcab3d93c953dcd8901bc717be4da2444f
Time: 2019-11-04
Author: marcel.stimberg@inserm.fr
File Name: brian2/tests/test_spikegenerator.py
Class Name:
Method Name: test_spikegenerator_incorrect_period


Project Name: brian-team/brian2
Commit Name: 7bb022dcab3d93c953dcd8901bc717be4da2444f
Time: 2019-11-04
Author: marcel.stimberg@inserm.fr
File Name: brian2/tests/test_spikegenerator.py
Class Name:
Method Name: test_spikegenerator_incorrect_period


Project Name: brian-team/brian2
Commit Name: 7bb022dcab3d93c953dcd8901bc717be4da2444f
Time: 2019-11-04
Author: marcel.stimberg@inserm.fr
File Name: brian2/tests/test_spikegenerator.py
Class Name:
Method Name: test_spikegenerator_incorrect_values


Project Name: brian-team/brian2
Commit Name: 7bb022dcab3d93c953dcd8901bc717be4da2444f
Time: 2019-11-04
Author: marcel.stimberg@inserm.fr
File Name: brian2/tests/test_spikegenerator.py
Class Name:
Method Name: test_spikegenerator_period_rounding