Test python scripts
Some scripts in this directory can be tested using a framework like pytest.
A rudimentary example would be to run RegenerateConnectome and look for a 0 exit code (i.e. the script exited successfully).
Higher value tests can compare the outputs of these modules to an expected output, or run specific functions defined in them. This will vary depending on the actual script in question.
For now, let's enumerate some modules, and possible tests that could provide a benefit:
- [ ] Run
RegenerateConnectome.pyand check for0exit code (mentioned above) - [ ] Run
SpreadsheetDataReader.pyand check for0 - [ ] Run
OpenWormReader.pyand check for0
Have added more Python scripts that can be tested. See also note here: https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/README.md
@brijeshmodi12 have a look at this as well.
These are all currently tested in the .travis.yml.
Pytest added: All 3 files: RegenerateConnectome.py, SpreadsheetDataReader.py, OpenWormReader.py are now being tested via py.test.
Test passed successfully on Travis https://travis-ci.org/brijeshmodi12/CElegansNeuroML/jobs/135151497#L1717