Running tests after building from source
Posted: Sun Feb 13, 2022 8:57 pm
Following the directions here: https://neuronsimulator.github.io/nrn/c ... tions.html
In particular I tried to run these commands after cloning:
mkdir build
cmake .. -DNRN_ENABLE_TESTS=ON ...
make -j
make test
ctest -VV -R parallel_tests
cd ../test/pynrn
python3 -m pytest test_bbss.py
The 24 tests from make test ran fine and reported passed.
The ctest -VV command could not find tests.
test_bbss.py produced errors about HocObject no attribute 'Follower'.
Not sure what I am missing?
jpinezich@jpinezich-VirtualBox:~/NRN/git/nrn/test/pynrn$ python3 -m pytest test_bbss.py
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/jpinezich/NRN/git/nrn
plugins: cov-3.0.0
collected 1 item
test_bbss.py F [100%]
========================================================================================== FAILURES ==========================================================================================
_________________________________________________________________________________________ test_bbss __________________________________________________________________________________________
def test_bbss():
print("focus on BinQ initialization Issue #1444")
ncell = 3
n = 5
> model = Model2(5)
test_bbss.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_bbss.Model2 object at 0x7fa6e2ba4070>, n = 5
def __init__(self, n):
self.ncell_per_layer = [1, n, 2]
self.cells = {}
# make cells and associate with gid (round robin distribution)
for ilayer, ncell in enumerate(self.ncell_per_layer):
for icell in range(ncell):
gid = self.info2gid(ilayer, icell)
if (gid % pc.nhost()) == pc.id():
> self.cells[gid] = h.Follower()
E AttributeError: 'hoc.HocObject' object has no attribute 'Follower'
test_bbss.py:57: AttributeError
------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------
focus on BinQ initialization Issue #1444
================================================================================== short test summary info ===================================================================================
FAILED test_bbss.py::test_bbss - AttributeError: 'hoc.HocObject' object has no attribute 'Follower'
===================================================================================== 1 failed in 0.08s ======================================================================================
jpinezich@jpinezich-VirtualBox:~/NRN/git/nrn/test/pynrn$
In particular I tried to run these commands after cloning:
mkdir build
cmake .. -DNRN_ENABLE_TESTS=ON ...
make -j
make test
ctest -VV -R parallel_tests
cd ../test/pynrn
python3 -m pytest test_bbss.py
The 24 tests from make test ran fine and reported passed.
The ctest -VV command could not find tests.
test_bbss.py produced errors about HocObject no attribute 'Follower'.
Not sure what I am missing?
jpinezich@jpinezich-VirtualBox:~/NRN/git/nrn/test/pynrn$ python3 -m pytest test_bbss.py
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/jpinezich/NRN/git/nrn
plugins: cov-3.0.0
collected 1 item
test_bbss.py F [100%]
========================================================================================== FAILURES ==========================================================================================
_________________________________________________________________________________________ test_bbss __________________________________________________________________________________________
def test_bbss():
print("focus on BinQ initialization Issue #1444")
ncell = 3
n = 5
> model = Model2(5)
test_bbss.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_bbss.Model2 object at 0x7fa6e2ba4070>, n = 5
def __init__(self, n):
self.ncell_per_layer = [1, n, 2]
self.cells = {}
# make cells and associate with gid (round robin distribution)
for ilayer, ncell in enumerate(self.ncell_per_layer):
for icell in range(ncell):
gid = self.info2gid(ilayer, icell)
if (gid % pc.nhost()) == pc.id():
> self.cells[gid] = h.Follower()
E AttributeError: 'hoc.HocObject' object has no attribute 'Follower'
test_bbss.py:57: AttributeError
------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------
focus on BinQ initialization Issue #1444
================================================================================== short test summary info ===================================================================================
FAILED test_bbss.py::test_bbss - AttributeError: 'hoc.HocObject' object has no attribute 'Follower'
===================================================================================== 1 failed in 0.08s ======================================================================================
jpinezich@jpinezich-VirtualBox:~/NRN/git/nrn/test/pynrn$