Esempio n. 1
0
    def __init__(self, session_id, net_pipe, proc_pipe, serializer, plugin_id,
                 version_table, original_version_table, verbose, custom_data):
        Logs._set_verbose(verbose)
        self._menus = {}

        self._network = _ProcessNetwork(self, session_id, net_pipe, serializer,
                                        plugin_id, version_table)
        self._process_manager = _ProcessManagerInstance(proc_pipe)

        Logs.debug("Plugin constructed for session", session_id)
        self._network._send_connect(
            _Messages.connect,
            [_Packet._compression_type(), original_version_table])
        self._run_text = "Run"
        self._run_usable = True
        self._advanced_settings_text = "Advanced Settings"
        self._advanced_settings_usable = True
        self._custom_data = custom_data
Esempio n. 2
0
    os.makedirs(test_output_dir)

import os

def get_download_path():
    """Returns the default downloads path for linux or windows"""
    if os.name == 'nt':
        import winreg
        sub_key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
        downloads_guid = '{374DE290-123F-4565-9164-39C4925E467B}'
        with winreg.OpenKey(winreg.HKEY_CURRENT_USER, sub_key) as key:
            location = winreg.QueryValueEx(key, downloads_guid)[0]
        return location
    else:
        return os.path.join(os.path.expanduser('~'), 'downloads')

import nanome
from nanome.util import Logs
Logs._set_verbose(True)

all_tests_passed = True
all_tests_passed = all_tests_passed and util.run_test_group(copy_tests)
all_tests_passed = all_tests_passed and util.run_test_group(conformer_tests)
all_tests_passed = all_tests_passed and util.run_test_group(atom_tests)
all_tests_passed = all_tests_passed and util.run_test_group(context_tests)
all_tests_passed = all_tests_passed and util.run_test_group(api_tests)
all_tests_passed = all_tests_passed and util.run_test_group(mmcif_tests)
all_tests_passed = all_tests_passed and util.run_test_group(sdf_tests)
all_tests_passed = all_tests_passed and util.run_test_group(ui_tests)
all_tests_passed = all_tests_passed and util.run_test_group(json_tests)
assert(all_tests_passed)