Skip to content

Commit

Permalink
add testing for analysis_params
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Dec 6, 2023
1 parent bb5a03f commit 7513202
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_spike_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def sa():

spiketrain = SpikeAnalysis()
spiketrain.set_stimulus_data(stimulus)
spiketrain.set_spike_data(spikes, cluster_ids=[0])
assert spiketrain.cluster_ids == [0]
spiketrain.set_spike_data(spikes)
return spiketrain

Expand Down
10 changes: 10 additions & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
jsonify_parameters,
NumpyEncoder,
prevalence_counts,
get_parameters,
)
import json
import os
Expand Down Expand Up @@ -100,6 +101,15 @@ def test_updata_jsonify_parameters(tmp_path):
assert key in final_params.keys()
assert value in final_params.values()

test_params = {"get_raw_psth": {"a": [1, 2]}}
jsonify_parameters(test_params)
params = get_parameters(file_path=tmp_path)
print(params)
assert params.psth is not None

for key, value in zip(["a"], [[1, 2]]):
assert params.psth[key] == value


def test_prevalence_values(tmp_path):
resp_dict = {
Expand Down

0 comments on commit 7513202

Please sign in to comment.