Skip to content

Commit

Permalink
Fix a scalar variable test in the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Stimberg committed Feb 27, 2014
1 parent 5592fc2 commit 1e3a0af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions brian2/tests/test_neurongroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def test_scalar_variable():
codeobj_class=codeobj_class)
# Setting should work in these ways
G.E_L = -70*mV
assert G.E_L[:] == -70*mV
assert_allclose(G.E_L[:], -70*mV)
G.E_L[:] = -60*mV
assert G.E_L[:] == -60*mV
assert_allclose(G.E_L[:], -60*mV)
G.E_L = 'E_L + s2*mV - 10*mV'
assert G.E_L[:] == -70*mV
assert_allclose(G.E_L[:], -70*mV)
G.E_L[:] = '-75*mV'
assert G.E_L[:] == -75*mV
assert_allclose(G.E_L[:], -75*mV)
net = Network(G)
net.run(defaultclock.dt)

Expand Down Expand Up @@ -520,6 +520,7 @@ def test_indices():
if __name__ == '__main__':
test_creation()
test_variables()
test_scalar_variable()
test_stochastic_variable()
test_unit_errors()
test_threshold_reset()
Expand Down

0 comments on commit 1e3a0af

Please sign in to comment.