def test_rois(): # iterables only with pytest.raises(TypeError): add_rois(1) # check range with pytest.raises(ValueError): add_rois([-1, ]) with pytest.raises(ValueError): add_rois([32, ]) # read-only? mca = EpicsMCA(devs[0], name='test') with pytest.raises(ReadOnlyError): mca.rois.roi1.count.put(3.14) with pytest.raises(ReadOnlyError): mca.rois.roi1.net_count.put(3.14)
def test_rois(mca): # iterables only with pytest.raises(TypeError): add_rois(1) # check range with pytest.raises(ValueError): add_rois([ -1, ]) with pytest.raises(ValueError): add_rois([ 32, ]) # read-only? with pytest.raises(ReadOnlyError): mca.rois.roi1.count.put(3.14) with pytest.raises(ReadOnlyError): mca.rois.roi1.net_count.put(3.14)