Beispiel #1
0
 def test_context_manager(self, cache):
     """ ensure the context manager reverts changes """
     context = corr._Context(cache, 'default')
     old_default = cache['default']
     new_val = corr.numpy_normxcorr
     with context(new_val):
         assert cache['default'] == new_val
     assert old_default
Beispiel #2
0
 def set_xcorr(self, cache):
     return corr._Context(cache, 'default')