Closed JCGoran closed 2 weeks ago
Logfiles from GitLab pipeline #215181 (:white_check_mark:) have been uploaded here!
Status and direct links:
As discussed offline, the simplicity of simply having a mod file and an associated script is valuable because it mixes well with many important debugging tools. It also allows the usecases to double as examples. Finally, we often test that things are in the correct global state, before running "init". Therefore, we need to run tests in separate processes.
This is based on #1294 so I don't need to solve future merge conflicts.
To outline how it works:
test
(hencesimulate.py
becomestest_sim.py
or whatever) so pytest can pick them uptest
usecases
dir needs an__init__.py
(because pytest makes it basically impossible to use something like fixtures) since that's where we define a common function for compiling mod files,compile_modfile
__init__.py
(can be empty, but the file must exist) so we can actually import thecompile_modfile
functionNone
or somePath
instance), and run those in turn (as a discussion point, should the argument be justnmodl
/nocmodl
, and then it looks up the location dynamically? Then we can parametrize the function with just['nocmodl', 'nmodl']
rather than the more verbose[None, shutil.which("nmodl")]
which requires remembering to import theshutil
module)load_mechanisms
to actually make it visible for NEURON (otherwiseinsert
fails)