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 17
17
from guidata .env import execenv
18
18
from guidata .qthelpers import exec_dialog , qt_app_context
19
19
20
- from plotpy .mathutils .colormap import ALL_COLORMAPS , delete_cmap , get_cmap
20
+ from plotpy .mathutils .colormap import delete_cmap , get_cmap
21
21
from plotpy .widgets .colormap .manager import ColorMapManager
22
22
from plotpy .widgets .colormap .widget import EditableColormap
23
23
@@ -50,8 +50,8 @@ def test_colormap_manager(test_cmap: EditableColormap) -> None:
50
50
# set the colormap to last one
51
51
with execenv .context (accept_dialogs = True ):
52
52
cmap_editor .remove_colormap ()
53
+ result = exec_dialog (cmap_editor )
53
54
54
- result = exec_dialog (cmap_editor )
55
55
execenv .print ("Dialog result:" , result )
56
56
cmap = cmap_editor .get_colormap ()
57
57
execenv .print ("Selected colormap:" , None if cmap is None else cmap .name )
Original file line number Diff line number Diff line change 12
12
13
13
from plotpy .builder import make
14
14
from plotpy .tests import vistools as ptv
15
- from plotpy .tools import CurveStatsTool
16
15
17
16
18
17
def test_plot ():
Original file line number Diff line number Diff line change 28
28
import qtpy .QtGui as QG
29
29
import qtpy .QtWidgets as QW
30
30
from guidata .configtools import get_icon
31
+ from guidata .env import execenv
31
32
from guidata .qthelpers import exec_dialog
32
33
33
34
from plotpy .config import _
@@ -352,7 +353,10 @@ def remove_colormap(self) -> None:
352
353
QW .QMessageBox .Ok ,
353
354
)
354
355
return
355
- if (
356
+ if execenv .unattended : # For testing purposes only
357
+ if not execenv .accept_dialogs :
358
+ return
359
+ elif (
356
360
QW .QMessageBox .question (
357
361
self ,
358
362
_ ("Remove" ),
You can’t perform that action at this time.
0 commit comments