Example #1
0
def apply_editor():
    if _select_editor():
        if random.randint(0, 9) < 9:
            log.debug('Simulate apply editor')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            wxgui_api.simulate_apply_editor()
        else:
            log.debug('Simulate apply all editors')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            wxgui_api.simulate_apply_all_editors()
    else:
        # Databases are blocked in simulator._do_action
        core_api.release_databases()
        return False
Example #2
0
def apply_editor():
    if _select_editor():
        if random.randint(0, 9) < 9:
            log.debug('Simulate apply editor')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            wxgui_api.simulate_apply_editor()
        else:
            log.debug('Simulate apply all editors')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            wxgui_api.simulate_apply_all_editors()
    else:
        # Databases are blocked in simulator._do_action
        core_api.release_databases()
        return False
Example #3
0
def close_editor():
    if _select_editor():
        apply_ = random.randint(0, 5)
        if random.randint(0, 9) < 9:
            log.debug('Simulate' + (' apply and ' if apply_ > 0 else ' ') +
                      'close editor')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            if apply_ > 0:
                wxgui_api.simulate_apply_editor()
            wxgui_api.simulate_close_editor(ask='quiet')
        else:
            log.debug('Simulate' + (' apply and ' if apply_ > 0 else ' ') +
                      'close all editors')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            if apply_ > 0:
                wxgui_api.simulate_apply_all_editors()
            wxgui_api.simulate_close_all_editors(ask='quiet')
    else:
        # Databases are blocked in simulator._do_action
        core_api.release_databases()
        return False
Example #4
0
def close_editor():
    if _select_editor():
        apply_ = random.randint(0, 5)
        if random.randint(0, 9) < 9:
            log.debug('Simulate' + (' apply and ' if apply_ > 0 else ' ') +
                                                                'close editor')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            if apply_ > 0:
                wxgui_api.simulate_apply_editor()
            wxgui_api.simulate_close_editor(ask='quiet')
        else:
            log.debug('Simulate' + (' apply and ' if apply_ > 0 else ' ') +
                                                        'close all editors')
            # Databases are blocked in simulator._do_action
            core_api.release_databases()
            if apply_ > 0:
                wxgui_api.simulate_apply_all_editors()
            wxgui_api.simulate_close_all_editors(ask='quiet')
    else:
        # Databases are blocked in simulator._do_action
        core_api.release_databases()
        return False