Skip to content

Commit

Permalink
test: added test for synaptic gains getter method
Browse files Browse the repository at this point in the history
  • Loading branch information
gtdang committed Oct 22, 2024
1 parent d46f2a5 commit 05a3cf2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions hnn_core/tests/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@ def test_network_mesh():
_ = law_2021_model(mesh_shape=mesh_shape)


def test_synaptic_gains():
"""Test synaptic gains update"""
def test_set_synaptic_gains():
"""Test synaptic gains setter"""
net = jones_2009_model()
nb_base = NetworkBuilder(net)
e_cell_names = ['L2_pyramidal', 'L5_pyramidal']
Expand Down Expand Up @@ -963,6 +963,16 @@ def _get_weight(nb, conn_name, idx=0):
_get_weight(nb_base, 'L2Pyr_L5Basket_ampa')) == 1


def test_get_synaptic_gains():
"""Test synaptic gains getter."""
net = jones_2009_model()
assert net.get_synaptic_gains() == {'e_e': 1.0, 'e_i': 1.0,
'i_e': 1.0, 'i_i': 1.0}
new_gains = {'e_e': 0.5, 'e_i': 1.5, 'i_e': 0.75, 'i_i': 1.0}
net.set_synaptic_gains(**new_gains)
assert net.get_synaptic_gains() == new_gains


class TestPickConnection:
"""Tests for the pick_connection function."""
@pytest.mark.parametrize("arg_name",
Expand Down

0 comments on commit 05a3cf2

Please sign in to comment.