def test_set_default(self): """ ensure the default can be overwritten """ func = gen_xcorr_func('funky') corr.register_array_xcorr(func, is_default=True) assert corr.XCOR_FUNCS['default'] is func
def r_normxcorr(self): """ return a registered normxcorr function """ return register_array_xcorr(gen_xcorr_func('normxcorr'))
def test_register_as_callable(self): """ ensure register can be used as a callable to take a name and a normxcorr func """ func = gen_xcorr_func('funky') register_array_xcorr(name='func3', func=func) assert self.name_func_is_registered('func3')