StubIde#

class ansys.scade.guitools.stubs.StubIde#

Bases: ansys.scade.guitools.ide.Ide

SCADE IDE instantiation for unit tests.

This class stubs most popular functions by storing inputs so that they can be compared with expected data.

It can be sub-classed for specific use-cases.

Overview#

activate

Ignore the call.

activate_browser

Ignore the call.

activate_project

Ignore the call.

activate_tab

Ignore the call.

browse_directory

Ignore the call.

browser_report

Stub scade.browser_report.

clear_tab

Ignore the call.

command

Ignore the call.

create_browser

Stub scade.create_browser.

create_report

Stub scade.create_report.

file_open

Ignore the call.

file_save

Ignore the call.

get_active_configuration

Stub scade.get_active_configuration.

get_active_project

Stub scade.get_active_project.

get_projects

Stub scade.model.project.stdproject.get_roots.

get_sessions

Stub scade.model.suite.get_roots.

locate

Ignore the call.

locate_ex

Ignore the call.

log

Redirect the call to the local log function.

message_box

Ignore the call.

open_document_view

Ignore the call.

open_html_in_browser

Ignore the call.

open_html_view

Ignore the call.

open_source_code_view

Ignore the call.

output_log

Ignore the call.

print

Ignore the call.

print_ssl

Ignore the call.

printer_setup

Ignore the call.

register_decoration

Stub suite.register_decoration.

register_load_model_callable

Ignore the call.

register_terminate_callable

Ignore the call.

register_unload_model_callable

Ignore the call.

report

Stub scade.report.

save_browser

Store the current browser as a json file.

set_decoration

Stub suite.set_decoration.

set_output_tab

Ignore the call.

set_style

Ignore the call.

tabput

Ignore the call.

unset_decoration

Ignore the call.

version

Stub scade.version.

selection

Stub return scade.selection.

Import detail#

from ansys.scade.guitools.stubs import StubIde

Property detail#

property StubIde.selection: List[Any]#

Stub return scade.selection.

Attribute detail#

StubIde.browser = None#
StubIde.browser_items: Dict[Any, Any]#
StubIde.decorated_items: Dict[scade.model.suite.Object, str]#
StubIde.decorations: list[str] = []#
StubIde.project: scade.model.project.stdproject.Project | None = None#
StubIde.report_items: List[list] = []#
StubIde.report_tab: str = ''#
StubIde.session: scade.model.suite.Session | None = None#

Method detail#

StubIde.activate(object_: Any)#

Ignore the call.

StubIde.activate_browser(tab_name: str)#

Ignore the call.

StubIde.activate_project(project_name: str)#

Ignore the call.

StubIde.activate_tab(tab: str)#

Ignore the call.

StubIde.browse_directory(initial_directory: str = '') str#

Ignore the call.

StubIde.browser_report(child_object: Any, parent_object: Any = None, expanded: bool = False, user_data: Any = None, name: str = '', icon_file: str = '')#

Stub scade.browser_report.

StubIde.clear_tab(tab: str)#

Ignore the call.

StubIde.command(extension_id: str, command_id: int, command: str = 'activate') str | None#

Ignore the call.

StubIde.create_browser(name: str, icon_file: str | None = None, keep: bool = False, callback: Callable[[Any, Any], None] = None)#

Stub scade.create_browser.

StubIde.create_report(tab_name: str, *header: Tuple[str, int, int], check: bool = False)#

Stub scade.create_report.

StubIde.file_open(filter: str = '', directory: str = '') str#

Ignore the call.

StubIde.file_save(file_name: str, extension: str = '', directory: str = '', filter: str = '') str#

Ignore the call.

StubIde.get_active_configuration(project: scade.model.project.stdproject.Project, tool_name: str) scade.model.project.stdproject.Configuration | None#

Stub scade.get_active_configuration.

StubIde.get_active_project() scade.model.project.stdproject.Project#

Stub scade.get_active_project.

StubIde.get_projects() List[scade.model.project.stdproject.Project]#

Stub scade.model.project.stdproject.get_roots.

StubIde.get_sessions() List[scade.model.suite.Session]#

Stub scade.model.suite.get_roots.

StubIde.locate(locate_string: str)#

Ignore the call.

StubIde.locate_ex(tuples: List[scade.model.suite.Object] | List[Tuple])#

Ignore the call.

StubIde.log(text: str)#

Redirect the call to the local log function.

StubIde.message_box(name: str, message: str, style: str = 'ok', icon: str = 'information') int#

Ignore the call.

StubIde.open_document_view(file_name: str)#

Ignore the call.

StubIde.open_html_in_browser(file_name: str)#

Ignore the call.

StubIde.open_html_view(file: str | List[str], use: str | None = None, delete: bool = False)#

Ignore the call.

StubIde.open_source_code_view(file_name: str, line: int = 1, col: int = 1)#

Ignore the call.

StubIde.output_log(tab_name: str, command: str, path_name: str = '', separator: str = '')#

Ignore the call.

StubIde.print(source_object: Any, path_name: str, format: str, rotation: int = 0)#

Ignore the call.

StubIde.print_ssl(scade_operator: scade.model.suite.Operator, path_name: str, format: str, rotation: int = 0)#

Ignore the call.

StubIde.printer_setup(printer_name: str)#

Ignore the call.

StubIde.register_decoration(name: str, small_icon: str, large_icon: str)#

Stub suite.register_decoration.

StubIde.register_load_model_callable(callable)#

Ignore the call.

StubIde.register_terminate_callable(callable)#

Ignore the call.

StubIde.register_unload_model_callable(callable)#

Ignore the call.

StubIde.report(item: Any, *columns: str)#

Stub scade.report.

StubIde.save_browser(path: pathlib.Path)#

Store the current browser as a json file.

StubIde.set_decoration(object_: scade.model.suite.Object, name: str)#

Stub suite.set_decoration.

StubIde.set_output_tab(tab: str)#

Ignore the call.

StubIde.set_style(presentation_element: scade.model.suite.PresentationElement, style_name: str)#

Ignore the call.

StubIde.tabput(tab: str, text: str)#

Ignore the call.

StubIde.unset_decoration(object_: scade.model.suite.Object)#

Ignore the call.

StubIde.version(kind: str) str#

Stub scade.version.