Skip to content

Commit

Permalink
reformatted test_neuron
Browse files Browse the repository at this point in the history
  • Loading branch information
danilobenozzo committed Aug 3, 2024
1 parent f83cd5c commit 0143a78
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions tests/test_neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def test_4ch_manual(self):
receiving_cells,
)


@unittest.skipIf(not neuron_installed(), "NEURON is not installed")
class TestNeuronSmallChunk(
RandomStorageFixture,
Expand Down Expand Up @@ -287,6 +288,7 @@ def test_smallch_manual(self):
receiving_cells,
)


@unittest.skipIf(not neuron_installed(), "NEURON is not installed")
class TestNeuronMultiBranch(
RandomStorageFixture,
Expand Down Expand Up @@ -349,7 +351,9 @@ def test_500ch_multibranch_manualconn(self):
for cell in pop
for i_sec, sec_i in enumerate(cell.sections)
if (
transmitter := getattr(cell.sections[i_sec], "_transmitter", None)
transmitter := getattr(
cell.sections[i_sec], "_transmitter", None
)
)
]
)
Expand All @@ -375,7 +379,7 @@ def test_500ch_multibranch_manualconn(self):
("A", 0, 1, 1),
("A", 3, 1, 2),
("A", 5, 0, 3),
# B
# B
("B", 5, 0, 4),
# C
("C", 1, 0, 5),
Expand All @@ -402,7 +406,8 @@ def test_500ch_multibranch_manualconn(self):
],
receiving_cells,
)



@unittest.skipIf(not neuron_installed(), "NEURON is not installed")
class TestNeuronMultiBranchLoop(
RandomStorageFixture,
Expand Down Expand Up @@ -467,7 +472,9 @@ def test_500ch_manualloop(self):
for cell in pop
for i_sec, sec_i in enumerate(cell.sections)
if (
transmitter := getattr(cell.sections[i_sec], "_transmitter", None)
transmitter := getattr(
cell.sections[i_sec], "_transmitter", None
)
)
]
)
Expand Down Expand Up @@ -495,37 +502,36 @@ def test_500ch_manualloop(self):
("A", 3, 0, 3),
("A", 3, 1, 4),
("A", 5, 0, 5),
# B
# B
("B", 5, 0, 6),
# C
# C
("C", 1, 0, 7),
("C", 5, 0, 8),
],
transmitting_cells,
)
self.assertEqual(
[

("A", 0, 1, 0), # A to A
("A", 1, 0, 8), # C to A
("A", 3, 0, 2), # A to A
("A", 5, 0, 7), # C to A
("A", 7, 1, 0), # A to A
("A", 7, 1, 4), # A to A
("A", 11, 0, 8), # C to A
("A", 0, 1, 0), # A to A
("A", 1, 0, 8), # C to A
("A", 3, 0, 2), # A to A
("A", 5, 0, 7), # C to A
("A", 7, 1, 0), # A to A
("A", 7, 1, 4), # A to A
("A", 11, 0, 8), # C to A
("B", 1, 0, 8), # C to B
# A to B
("B", 3, 0, 0),
("B", 3, 0, 0),
("B", 3, 0, 1),
("B", 5, 0, 3),
("B", 5, 0, 7), # C to B
("B", 8, 0, 3), # A to B
("B", 10, 0, 5), # A to B
("B", 11, 0, 8), # C to B
("B", 5, 0, 7), # C to B
("B", 8, 0, 3), # A to B
("B", 10, 0, 5), # A to B
("B", 11, 0, 8), # C to B
# B to C
("C", 9, 0, 6),
("C", 10, 0, 6),
("C", 11, 0, 6),
],
receiving_cells,
)
)

0 comments on commit 0143a78

Please sign in to comment.