bendalab / thunderfish

python scripts for analyzing recordings of efish electric fields.
GNU General Public License v3.0
5 stars 8 forks source link

add test infrastructure #15

Closed fabiansinz closed 8 years ago

jgrewe commented 8 years ago

nice!

fabiansinz commented 8 years ago

I can't get coveralls to work at the moment. Maybe someone else can try. At least the tests are working. The test-coverage is, of course, shamefully low.

jgrewe commented 8 years ago

grml ...

travis says:

Traceback (most recent call last): File "setup.py", line 5, in packages=find_packages(exclude=['contrib', 'doc', 'tests*']), NameError: name 'find_packages' is not defined

fabiansinz commented 8 years ago

Forgot to import the function. Next is on the way.

fabiansinz commented 8 years ago

Yes, coveralls works again!

fabiansinz commented 8 years ago

Yes! Coveralls works. Happy test writing. @jfsehuanes @tillraab if you want to try the tests locally, just copy the command from the .travis.yml (once the pull request is accepted).

nosetests -vv --with-coverage --cover-package=thunderfish
jfsehuanes commented 8 years ago

Thank you @fabiansinz for your well known enthusiasm and efficiency. I however feel a little uncomfortable merging this pull request, since I really do not understand most of the stuff. I know what a test is meant to do (remember Fabian lecturing me on this) but I really do not know how exactly it works. Maybe @jgrewe should merge this pull-request?

fabiansinz commented 8 years ago

Just to be complete here. Basic testing is quite easy now:

I think the goal should be to reach at least 80% test coverage. Especially when restructuring the code it is very convenient because you can make sure that everything still runs as supposed after making changes.