Ejemplo n.º 1
0
    def test_main(self):
        CONDA.env = 'abc'
        dep_libs =[Dependency(name='pip', installer=CONDA)]
        try:
            dep_manager.main(['only one'], dep_libs)
        except ValueError as ve:
            self.assertTrue(ve.args[0].startswith('need to pass in parameters'))

        try:
            dep_manager.main(['unknown', 'option'], dep_libs)
        except ValueError as ve:
            self.assertTrue(ve.args[0].startswith('unknown parameter'))

        dep_manager.main(['file', 'conda_env'], dep_libs)

        dep_manager.main(['file', 'pip'], dep_libs)
        os.remove('requirements.txt')

        dep_manager.main(['file', 'conda'], dep_libs)
        os.remove('environment.yml')
Ejemplo n.º 2
0
    Dependency(name='pipdeptree', scope=DEV, installer=PIP),
    Dependency(name='coverage-badge'),  # default to DEV and PIP automatically.
    Dependency(name='twine'),  # uploading to pypi
    Dependency(name='conda-build', installer=CONDA),
    Dependency(name='conda-verify', installer=CONDA),
    Dependency(name='anaconda-client', installer=CONDA),
]

# ##############################################################################
# No need change below, unless you want to customize
# ##############################################################################

# used by setup.py, hide details - how we compute these values.
install_required = pip_translator.get_install_required(dependent_libs)

test_required = pip_translator.get_test_required(dependent_libs)

python_required = pip_translator.get_python_requires(dependent_libs)


def app_name():
    return __app_name


def app_version():
    return __app_version


if __name__ == "__main__":
    dep_manager.main(sys.argv, dependent_libs)