Testing¶
Running Test Files¶
Python files for testing can be found in the tests subdirectory of the project.
There are two types of test files:
Unit test files to be run by pytest
These files begin with
testand end with.py.The tests be run by typing
pytestinside thetestsdirectory of the libsbml-draw repository.Note: If you are using “Tellurium for Windows”, you will need to use the Python associated with that to run the tests to make sure you’re using the required libraries; for example, you might run:
C:\Tellurium-Winpython-3.7\python-3.7.4.amd64\python -m pytestThese files can be run automatically by selecting
Run unit testsfrom the SpyderRunmenu.(Note: you will need to install
spyder-unittestfor this to work; i.e.pip install spyder-unittest)Files to be run by python
These files begin with
mtestand end with.py.These files can be run from Spyder by opening the file and pressing the big green arrow.
mteststands for manual tests. These tests draw the models, so that the user can view them.They also write out SBML model files. They contain
assertstatements which test values after being set.