def remove_layer(self, layer):
        self.select_layers(layer)
        QTest.mouseClick(self.widget.ui.layerRemoveButton, Qt.LeftButton)
Remove a layer via the widget remove button
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/tests/test_layer_tree_widget.py/TestLayerTree.remove_layer