SmartDataInnovationLab / ipython-cache

versatile cache line magic for ipython
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

create unit tests #3

Open bjuergens opened 6 years ago

bjuergens commented 6 years ago

this guide suggests to use doctest.

Until now the testing is done manually via notebooks.

There should be some tests, that call the notebook from the commandline. This should be possible without modifying the module


Maybe there should also be some unit tests, that use the package as regular python-module, and not as ipython. This might require some changes. But at first glance, beside the registration with ipython, only 2 parts of the package require ipython:

The implementation would be like this: Those 2 things get moved function-parameters in the constructor, so the caller (e.g. the magics-class) has to supply them.

The real question is: Should it even be possible to use this module outside ipython?

bjuergens commented 6 years ago

http://jupyter.readthedocs.io/en/latest/development_guide/testing.html

http://nbconvert.readthedocs.io/en/latest/execute_api.html#executing-notebooks-from-the-command-line