Skip to content

Commit

Permalink
add unit test for test_synlocation_to_segx
Browse files Browse the repository at this point in the history
  • Loading branch information
anilbey committed Oct 12, 2023
1 parent 8931881 commit 46e534b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_synapse/test_synapse_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ def test_determine_synapse_location(self):
assert res.location == 1.2
assert res.section.L == pytest.approx(9.530376893488256)

def test_synlocation_to_segx(self):
ipt = 13
isec = 169
syn_offset = 1.2331762313842773
section = self.cell.get_hsection(isec)
res = SynapseFactory.synlocation_to_segx(section, ipt, syn_offset)
assert res == pytest.approx(0.9999999)
res = SynapseFactory.synlocation_to_segx(section, ipt, syn_offset=-1.0)
assert res == pytest.approx(0.9999999)


def test_determine_synapse_type():
"""Unit test for determine_synapse_type."""
Expand Down

0 comments on commit 46e534b

Please sign in to comment.