Exemple #1
0
 def fig_visibility_changed(self):
     """
     Make a notification in the global figure manager that
     plot visibility was changed. This method is added to this
     class so that it can be wrapped in a QAppThreadCall.
     """
     GlobalFigureManager.figure_visibility_changed(self.num)
Exemple #2
0
 def test_figure_visibility_changed(self):
     mock_figure_number = 99994
     with patch.object(GlobalFigureManager,
                       'notify_observers',
                       return_value=False) as mock_notify_observers:
         GlobalFigureManager.figure_visibility_changed(mock_figure_number)
         mock_notify_observers.assert_called_once_with(
             FigureAction.VisibilityChanged, mock_figure_number)
 def test_figure_visibility_changed(self):
     mock_figure_number = 99994
     with patch.object(GlobalFigureManager, 'notify_observers', return_value=False) as mock_notify_observers:
         GlobalFigureManager.figure_visibility_changed(mock_figure_number)
         mock_notify_observers.assert_called_once_with(FigureAction.VisibilityChanged, mock_figure_number)