Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 93c0685

Browse files
committed
Fixing create_acc tests
1 parent e85d695 commit 93c0685

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bluepyopt/tests/test_ephys/test_create_acc.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,13 +532,16 @@ def test_cell_model_write_and_read_acc_replace_axon():
532532

533533
with tempfile.TemporaryDirectory() as acc_dir:
534534
try:
535+
nrn_sim = ephys.simulators.NrnSimulator()
535536
cell.write_acc(acc_dir, param_values,
536-
sim=ephys.simulators.NrnSimulator())
537+
sim=nrn_sim)
537538
except Exception as e: # fail with an older Arbor version
538539
assert isinstance(e, NotImplementedError)
539540
assert len(e.args) == 1 and e.args[0] == \
540541
"Need a newer version of Arbor for axon replacement."
541542
return
543+
finally:
544+
cell.destroy(nrn_sim)
542545

543546
# Axon replacement implemented in installed Arbor version
544547
cell_json, arb_morph, arb_decor, arb_labels = \
@@ -630,6 +633,7 @@ def test_write_acc_simple():
630633
assert len(e.args) == 1 and e.args[0] == \
631634
"Need a newer version of Arbor for axon replacement."
632635
finally:
636+
cell.destroy(nrn_sim)
633637
os.chdir(old_cwd)
634638
sys.path.pop(0)
635639

@@ -682,6 +686,7 @@ def test_write_acc_l5pc():
682686
assert len(e.args) == 1 and e.args[0] == \
683687
"Need a newer version of Arbor for axon replacement."
684688
finally:
689+
cell.destroy(nrn_sim)
685690
os.chdir(old_cwd)
686691
sys.path.pop(0)
687692

0 commit comments

Comments
 (0)