File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1717from guidata .env import execenv
1818from guidata .qthelpers import exec_dialog , qt_app_context
1919
20- from plotpy .mathutils .colormap import ALL_COLORMAPS , delete_cmap , get_cmap
20+ from plotpy .mathutils .colormap import delete_cmap , get_cmap
2121from plotpy .widgets .colormap .manager import ColorMapManager
2222from plotpy .widgets .colormap .widget import EditableColormap
2323
@@ -50,8 +50,8 @@ def test_colormap_manager(test_cmap: EditableColormap) -> None:
5050 # set the colormap to last one
5151 with execenv .context (accept_dialogs = True ):
5252 cmap_editor .remove_colormap ()
53+ result = exec_dialog (cmap_editor )
5354
54- result = exec_dialog (cmap_editor )
5555 execenv .print ("Dialog result:" , result )
5656 cmap = cmap_editor .get_colormap ()
5757 execenv .print ("Selected colormap:" , None if cmap is None else cmap .name )
Original file line number Diff line number Diff line change 1212
1313from plotpy .builder import make
1414from plotpy .tests import vistools as ptv
15- from plotpy .tools import CurveStatsTool
1615
1716
1817def test_plot ():
Original file line number Diff line number Diff line change 2828import qtpy .QtGui as QG
2929import qtpy .QtWidgets as QW
3030from guidata .configtools import get_icon
31+ from guidata .env import execenv
3132from guidata .qthelpers import exec_dialog
3233
3334from plotpy .config import _
@@ -352,7 +353,10 @@ def remove_colormap(self) -> None:
352353 QW .QMessageBox .Ok ,
353354 )
354355 return
355- if (
356+ if execenv .unattended : # For testing purposes only
357+ if not execenv .accept_dialogs :
358+ return
359+ elif (
356360 QW .QMessageBox .question (
357361 self ,
358362 _ ("Remove" ),
You can’t perform that action at this time.
0 commit comments