File tree Expand file tree Collapse file tree 2 files changed +30
-17
lines changed
Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Original file line number Diff line number Diff line change 5454
5555import numpy as np
5656from guidata .configtools import get_icon , get_image_file_path
57- from guidata .qthelpers import is_dark_mode
57+ from guidata .env import execenv
58+ from guidata .qthelpers import exec_dialog , is_dark_mode
5859from qtpy import QtCore as QC
5960from qtpy import QtGui as QG
6061from qtpy import QtWidgets as QW
@@ -400,7 +401,9 @@ def show(self) -> StepResult:
400401 self .setup_callback (self .tour .win )
401402 self .update_cover (self .tour .cover )
402403 dialog = StepDialog (self .tour .win , self )
403- dialog .exec ()
404+ exec_dialog (dialog )
405+ if execenv .unattended and self .step_type != "conclusion" :
406+ dialog .result = StepResult .NEXT
404407 if self .teardown_callback is not None :
405408 self .teardown_callback (self .tour .win )
406409 return dialog .result
@@ -869,18 +872,3 @@ def start(win: CDLMainWindow) -> None:
869872 """
870873 tour = Tour (win )
871874 tour .start ()
872-
873-
874- def test_tour () -> None :
875- """
876- Test the tour of DataLab features.
877- """
878- # pylint: disable=import-outside-toplevel
879- from cdl .tests import cdltest_app_context
880-
881- with cdltest_app_context () as win :
882- start (win )
883-
884-
885- if __name__ == "__main__" :
886- test_tour ()
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ #
3+ # Licensed under the terms of the BSD 3-Clause
4+ # (see cdl/LICENSE for details)
5+
6+ """
7+ Tour test
8+ """
9+
10+ # guitest: show
11+
12+ from cdl .core .gui .tour import start
13+ from cdl .tests import cdltest_app_context
14+
15+
16+ def test_tour () -> None :
17+ """
18+ Test the tour of DataLab features.
19+ """
20+ with cdltest_app_context () as win :
21+ start (win )
22+
23+
24+ if __name__ == "__main__" :
25+ test_tour ()
You can’t perform that action at this time.
0 commit comments