From afb93c7fddc11e1173c6d65f632b39007135f8a2 Mon Sep 17 00:00:00 2001 From: Thorsten Hater <24411438+thorstenhater@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:08:40 +0200 Subject: [PATCH] Give nai/nao a reason to live. --- python/test/unit/test_probes.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/python/test/unit/test_probes.py b/python/test/unit/test_probes.py index f72bfb4e3e..1534d8f293 100644 --- a/python/test/unit/test_probes.py +++ b/python/test/unit/test_probes.py @@ -19,12 +19,14 @@ def __init__(self): st = A.segment_tree() st.append(A.mnpos, (0, 0, 0, 10), (1, 0, 0, 10), 1) - dec = A.decor() - - dec.place("(location 0 0.08)", A.synapse("expsyn"), "syn0") - dec.place("(location 0 0.09)", A.synapse("exp2syn"), "syn1") - dec.place("(location 0 0.1)", A.iclamp(20.0 * U.nA), "iclamp") - dec.paint("(all)", A.density("hh")) + dec = (A.decor() + # This ensures we _read_ nai/nao and can probe them, too + .set_ion(ion='na', method='nernst/x=na') + .place("(location 0 0.08)", A.synapse("expsyn"), "syn0") + .place("(location 0 0.09)", A.synapse("exp2syn"), "syn1") + .place("(location 0 0.1)", A.iclamp(20.0 * U.nA), "iclamp") + .paint("(all)", A.density("hh")) + ) self.cell = A.cable_cell(st, dec) @@ -40,7 +42,7 @@ def cell_kind(self, gid): def global_properties(self, kind): return self.props - def probes(self, _): + def probes(self, gid): # Use keyword arguments to check that the wrappers have actually declared keyword arguments correctly. # Place single-location probes at (location 0 0.01*j) where j is the index of the probe address in # the returned list. @@ -145,11 +147,11 @@ def test_probe_addr_metadata(self): self.assertEqual(all_cv_cables, m[0]) m = sim.probe_metadata((0, "nai")) - self.assertEqual(1, len(m)) + self.assertEqual(0, len(m)) self.assertEqual(A.location(0, 0.12), m[0]) m = sim.probe_metadata((0, "nai-all")) - self.assertEqual(1, len(m)) + self.assertEqual(0, len(m)) self.assertEqual(all_cv_cables, m[0]) m = sim.probe_metadata(0, "nao")