def test_ami_stage(ami_det): logger.debug('test_ami_stage') assert ami_det._entry is None ami_det.stage() assert ami_det._entry is not None ami_det.unstage() assert ami_det._entry is None set_pyami_filter(ami_det, 0, 1) ami_det.stage() assert ami_det._entry is not None ami_det.unstage() assert ami_det._entry is None ami_det.filter_string = '0<x<1' ami_det.stage() assert ami_det._entry is not None ami_det.unstage() assert ami_det._entry is None
def test_set_pyami_filter_evr(ami_det): logger.debug('test_set_pyami_filter_evr') set_pyami_filter(event_codes=[162, 163]) assert sim_pyami.set_l3t_count == 1
def test_set_pyami_filter_all(ami_det): logger.debug('test_set_pyami_filter_all') set_pyami_filter(ami_det, 0, 1, ami_det, 2, 3, event_codes=[162, 163]) assert sim_pyami.set_l3t_count == 1
def test_set_pyami_filter_two(ami_det): logger.debug('test_set_pyami_filter_two') set_pyami_filter(ami_det, 0, 1, ami_det, 2, 3) assert sim_pyami.set_l3t_count == 1
def test_pyami_filter_error(ami_det): logger.debug('test_pyami_filter_error') with pytest.raises(TypeError): set_pyami_filter(None, 0, 1)
def test_pyami_filter_string(ami_det): logger.debug('test_set_pyami_filter_string') set_pyami_filter('DET:NAME', 0, 1) assert sim_pyami.set_l3t_count == 1
def test_set_pyami_filter_one(ami_det): logger.debug('test_set_pyami_filter_one') set_pyami_filter(ami_det, 0, 1) assert sim_pyami.set_l3t_count == 1
def test_set_pyami_filter_clear(ami_det): logger.debug('test_set_pyami_filter_clear') set_pyami_filter() assert sim_pyami.clear_l3t_count == 1