

def test_recalc_on_state_changes(self):
    ct = self.setup_hist_calc_counter()
    assert (ct.call_count == 0)
    self.artist.update()
    assert (ct.call_count == 1)
    self.artist.lo -= 1
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 2)
    self.artist.hi -= 1
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 3)
    self.artist.nbins += 1
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 4)
    ct.artist.xlog ^= True
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 5)
    self.artist.ylog ^= True
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 5)
    self.artist.cumulative ^= True
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 5)
    self.artist.normed ^= True
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 5)
    self.artist.layer.style.color = '#00ff00'
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 5)
    self.artist.layer.subset_state = (self.artist.layer.data.id['x'] > 10)
    self.artist.update()
    self.artist.update()
    assert (ct.call_count == 6)

dataset/ETHPy150Open glue-viz/glue/glue/viewers/histogram/tests/test_client.py TestHistogramLayerArtist.test_recalc_on_state_changes/VarMisuse@143/157 `self`->`ct`