Пример #1
0
def maybe_stop_for_interaction(qtbot: QtBot) -> None:
    """
    Stop the tests to interact with the GUI if 'TEST_INTERACT' environment
    variable is set.
    """
    if os.environ.get("TEST_INTERACT"):
        qtbot.stopForInteraction()
Пример #2
0
def show_window_and_wait_for_interaction(qtbot: QtBot, template: QDialog):
    """
    Helper method that allows you to examine a window during testing. Just here for convenience.
    Does nothing if the test is running on Windows because this is bad for Jenkins.
    :param qtbot: The qtbot testing tool.
    :param template: The window/widget to be opened.
    """
    if RUNNING_ON_WINDOWS:
        return
    template.show()
    qtbot.stopForInteraction()