Skip to content

Commit

Permalink
rename 'test_nodes'->'only_exists_in_simulation' for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Joni Herttuainen committed Nov 9, 2023
1 parent 47d205a commit 5adb640
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/data/node_sets_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Layer23": {
"layer": [2,3]
},
"test_nodes": {
"only_exists_in_simulation": {
"node_id": [0,2]
}
}
4 changes: 3 additions & 1 deletion tests/test_frame_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ def _assert_frame_equal(df1, df2):
_assert_frame_equal(self.test_obj.get(group=ids, t_step=t_step), self.df.loc[:, [0, 2]])

# test that simulation node_set is used
_assert_frame_equal(self.test_obj.get("test_nodes", t_step=t_step), self.df.loc[:, [0, 2]])
_assert_frame_equal(
self.test_obj.get("only_exists_in_simulation", t_step=t_step), self.df.loc[:, [0, 2]]
)

with pytest.raises(
BluepySnapError, match="All node IDs must be >= 0 and < 3 for population 'default'"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_all():
expected_content = {
**json.loads((TEST_DATA_DIR / "node_sets.json").read_text()),
"Layer23": {"layer": [2, 3]},
"test_nodes": {"node_id": [0, 2]},
"only_exists_in_simulation": {"node_id": [0, 2]},
}
assert simulation.node_sets.content == expected_content

Expand Down
2 changes: 1 addition & 1 deletion tests/test_spike_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_get(self):

# test that simulation node_set is used
pdt.assert_series_equal(
self.test_obj.get("test_nodes"),
self.test_obj.get("only_exists_in_simulation"),
_create_series([2, 0, 2, 0], [0.1, 0.2, 0.7, 1.3]),
)

Expand Down

0 comments on commit 5adb640

Please sign in to comment.