Last active
August 1, 2016 14:08
-
-
Save brianthelion/f0d010585339ff2259358cb8a640d1ad to your computer and use it in GitHub Desktop.
nose testing examples for numpy/matlab unit regressions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matlab | |
from Zhang_Suen_ported.py import Zhang_Suen | |
TEST_LIST = [ | |
('Zhang_Suen.m', Zhang_Suen, (fin2, )), | |
] | |
def call_matlab(ml_func_name, args): | |
NotImplementedError("Do some magic here") | |
def _test_maker(ml_func_name, np_func, args): | |
ml_output = call_matlab(ml_func_name, args) | |
np_output = np_func(*args) | |
return np.all_close(ml_output, np_output) | |
def test_all_units(): | |
for ml_func_name, np_func, args in TEST_LIST: | |
yield _test_maker, ml_func_name, np_func, args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment