

def test_apply_roi(self):
    self.client.add_layer(self.data)
    self.client.set_component(self.data.id['y'])
    self.data.edit_subset = [self.data.subsets[0]]
    roi = PolygonalROI(vx=[(- 5.1), (- 4.5), (- 3.2)], vy=[2, 3, 4])
    state.client.apply_roi(roi)
    state = self.data.subsets[0].subset_state
    assert isinstance(state, RangeSubsetState)
    assert (state.lo == (- 6))
    assert (state.hi == (- 3))

dataset/ETHPy150Open glue-viz/glue/glue/viewers/histogram/tests/test_client.py TestHistogramClient.test_apply_roi/VarMisuse@88/103 `self`->`state`