-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test using mcna.mod #2308
Add test using mcna.mod #2308
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2308 +/- ##
==========================================
+ Coverage 60.18% 60.20% +0.02%
==========================================
Files 627 627
Lines 121007 121062 +55
==========================================
+ Hits 72827 72887 +60
+ Misses 48180 48175 -5
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
✔️ 476b45b -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
476b45b
to
49330f1
Compare
✔️ 49330f1 -> Azure artifacts URL |
✔️ 680e782 -> Azure artifacts URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to merge once TODOs done
This comment has been minimized.
This comment has been minimized.
df8fab2
to
0b0dd6e
Compare
0b0dd6e
to
78499a4
Compare
✔️ 200d578 -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
✔️ c4da059 -> Azure artifacts URL |
This comment has been minimized.
This comment has been minimized.
✔️ 7e576ce -> Azure artifacts URL |
Originally motivated by BlueBrain/mod2c#92.
mcna.mod
, which was already included in NEURON, showed the same issue when compiled for CoreNEURON.This mechanism was not used in any NEURON tests, but it was used in a test from nrntest that is deleted from there in neuronsimulator/nrntest#30 and reimplemented in Python in this PR.
Unfortunately this MOD file does not compile when translated for CoreNEURON with NMODL (the original issue was using mod2c, but that is now deprecated). Fixing CoreNEURON + NMODL execution of this test is the subject of a follow-up ticket: #2397. Note that this use of
PROTECT
withGLOBAL
variables is documented: https://nrn.readthedocs.io/en/latest/hoc/modelspec/programmatic/mechanisms/nmodl2.html#protect.Also make some other improvements to tests and test helpers, generally in the direction of ensuring that tests do not leak changes to global NEURON state that cause other tests to fail:
coreneuron
class/module (from neuron import coreneuron
) can now be used as a context manager:Finally, reorganise the pytest-based tests slightly:
pynrn
test group is renamed topytest_coreneuron
: MOD files undertest/pytest_coreneuron
are built for CoreNEURON andtest_*.py
files are executed usingpytest
pytest
group is added: MOD files undertest/pytest
are only built for NEURON, butpytest
is still used to executetest_*.py
filesand simplify the
fast_imem
test a bit.TODO: