Skip to content

Commit

Permalink
Fix exception type in subgroup tests
Browse files Browse the repository at this point in the history
ValueError → TypeError
  • Loading branch information
mstimberg committed Nov 14, 2022
1 parent ec0fe52 commit aaacc26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions brian2/tests/test_subgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ def test_creation():
assert len(SGi2) == 3
assert SGi2.contiguous

with pytest.raises(ValueError):
with pytest.raises(TypeError):
Subgroup(G)
with pytest.raises(ValueError):
with pytest.raises(TypeError):
Subgroup(G, start=3)
with pytest.raises(ValueError):
with pytest.raises(TypeError):
Subgroup(G, stop=3)
with pytest.raises(IndexError):
Subgroup(G, start=-1, stop=5)
with pytest.raises(IndexError):
Subgroup(G, start=1, stop=1)
with pytest.raises(IndexError):
Subgroup(G, start=1, stop=11)
with pytest.raises(ValueError):
with pytest.raises(TypeError):
Subgroup(G, start=1, stop=11, indices=[2, 4, 6])
with pytest.raises(IndexError):
Subgroup(G, indices=[])
Expand Down

0 comments on commit aaacc26

Please sign in to comment.