Skip to content

Commit

Permalink
tests: update tests for read and write configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
gtdang committed May 3, 2024
1 parent 7884726 commit 765f704
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hnn_core/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@ def test_cell_response_to_dict(jones_2009_network):
""" Tests _cell_response_to_dict function """
net = jones_2009_network

# No simulation so should have None for cell response
# Without simulation there should be an empty dict
result1 = _cell_response_to_dict(net, write_output=True)
assert result1 is None
assert result1 == dict()

# Check for cell response dictionary after a simulation
simulate_dipole(net, tstop=2, n_trials=1, dt=0.5)
assert net.cell_response is not None
result2 = _cell_response_to_dict(net, write_output=True)
assert bool(result2) and isinstance(result2, dict)

# Check for None if kw supplied
# Check for empty dict if kw supplied
result3 = _cell_response_to_dict(net, write_output=False)
assert result3 is None
assert result3 == dict()


def test_rec_array_to_dict(jones_2009_network):
Expand Down

0 comments on commit 765f704

Please sign in to comment.