openworm / CElegansNeuroML

NeuroML based C elegans model, contained in a neuroConstruct project, as well as c302
http://opensourcebrain.org/projects/celegans
134 stars 50 forks source link

Test python scripts #53

Open travs opened 9 years ago

travs commented 9 years ago

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:

pgleeson commented 9 years ago

Have added more Python scripts that can be tested. See also note here: https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/README.md

slarson commented 8 years ago

@brijeshmodi12 have a look at this as well.

pgleeson commented 8 years ago

These are all currently tested in the .travis.yml.

brijeshmodi12 commented 8 years ago

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