-
Notifications
You must be signed in to change notification settings - Fork 7
Unit Testing
George Dietz edited this page May 9, 2016
·
8 revisions
-
Navigate to the OpenMEE base directory: git/OpenMEE
-
run
python -m unittest discover -v . "*_test.py"
-
One may encounter issues with unittest + virtualenv. I have had success using unittest2, and specifying the particular module to be tested:
python -m unittest2 python_to_R_test.py
(these will run only those unit tests inpython_to_R_test.py
, which constitute those testing the Python-to-R bridge and hence cover the analyses implemented in OpenMEE.) -
To run a particular testcase:
python -m unittest python_to_R_test.TestCaseToTest
We're using the testthat package for our R unit tests. You may need to install it.
- Start R
- Enter the following R commands:
library(devtools)
setwd (directory where openmeer is, e.g., "/Users/idahabreh/git/OpenMEE/R/openmeer")
devtools::test()