Exemple #1
0
    def start_ui(self):
        """"""
        misc.main_info(self.logger)

        shared.dependencies = Dependencies()

        if self.config.get_proxy_enabled():
            proxy_url, proxy_port = self.config.get_proxy()
            url_open.set_proxy(proxy_url, proxy_port)
        else:
            url_open.set_proxy(None)

        if self.options.wizard:
            self.set_verbose()
            self.start_wizard(self.options.wizard)
        elif self.options.daemon:
            self.set_verbose()
            if len(self.args) > 0:
                url = self.args[0]
            else:
                url = None
            self.start_daemon(self.options.links_file, url)
        elif self.options.cli:
            if len(self.args) > 0:
                url = self.args[0]
            else:
                url = None
            self.start_cli(self.options.links_file, url)
        else:
            if self.options.verbose:
                self.set_verbose()
            self.start_gui()
Exemple #2
0
def test_get_result():
    dependencies = Dependencies(requirements)
    dependencies.dependencies()
    result = dependencies.get_result
    assert isinstance(result, dict)
Exemple #3
0
def test_get_version():
    dependencies = Dependencies(requirements)
    dependencies.dependencies()
    version = dependencies.get_version('Flask')
    assert version == '0.10.1'
Exemple #4
0
def test_parse_xml():
    dependencies = Dependencies(pom)
    root = dependencies.parse_xml(pom)
    root_test = eT.parse(pom)
    assert isinstance(root, type(root_test))
Exemple #5
0
def test_find_java_mvn():
    dependencies = Dependencies(pom)
    dependencies.dependencies()
    assert 'pom-manipulation-io' in dependencies.get_result
Exemple #6
0
def test_find_python_pip():
    dependencies = Dependencies(requirements)
    dependencies.dependencies()
    assert 'Flask' in dependencies.get_result
Exemple #7
0
def test_get_path():
    dependencies = Dependencies(requirements)
    for root, dirs, filenames in os.walk(dependencies.directory):
        for filename in filenames:
            file_path = dependencies.get_path(root, filename)
            assert isinstance(file_path, list)
Exemple #8
0
def test_find_file():
    dependencies = Dependencies(requirements)
    file_path, flag = dependencies.find_file()
    assert isinstance(file_path, list)
    assert isinstance(flag, int)