def test_register(): new_strategy = e_calibration register_strategy('e_calibration', new_strategy, overwrite=False) assert_equal(len(_STRATEGY_REGISTRY), 5) new_strategy = copy.deepcopy(e_calibration) new_strategy['coherent_sct_amplitude'] = 'fixed' register_strategy('new_strategy', new_strategy) assert_equal(len(_STRATEGY_REGISTRY), 6)
def test_register_error(): with pytest.raises(RuntimeError): new_strategy = copy.deepcopy(e_calibration) new_strategy['coherent_sct_amplitude'] = 'fixed' register_strategy('e_calibration', new_strategy, overwrite=False)
def test_register_error(): new_strategy = copy.deepcopy(e_calibration) new_strategy['coherent_sct_amplitude'] = 'fixed' register_strategy('e_calibration', new_strategy, overwrite=False)