def test_conda_env_parsing_pass(self): """ Parse a conda environment file sucessfully """ builder_obj = builder.EnvBuilder( pf(PATH_GOOD_R_PKS, "rpackages.txt"), pf(PATH_GOOD_CONDA_ENV, "environment.yml") ) builder_obj.build()
def test_rpackage_parsing_and_warn(self): """ Parse a r package file and warn if empty """ builder_obj = builder.EnvBuilder( pf(PATH_EMPTY_R_PKS, "rpackages.txt"), pf(PATH_GOOD_CONDA_ENV, "environment.yml")) builder_obj.check_rpkgs() expectations = {"passed": 0, "warned": 2, "failed": 0} self.assess_builder_status(builder_obj, **expectations)
def test_rpackage_resolving_and_pass(self): """ Try to resolve a given R package dependency from either Anaconda's 'r'- or 'bioconda'-channel """ builder_obj = builder.EnvBuilder( pf(PATH_GOOD_R_PKS, "rpackages.txt"), pf(PATH_GOOD_CONDA_ENV, "environment.yml")) builder_obj.check_rpkgs() expectations = {"passed": 2, "warned": 1, "failed": 0} self.assess_builder_status(builder_obj, **expectations)
def test_conda_env_extension(self): """ Check, that resolved R packages are listed as dependencies in the environment.yml """ builder_obj = builder.EnvBuilder( pf(PATH_GOOD_R_PKS, "rpackages.txt"), pf(PATH_GOOD_CONDA_ENV, "environment.yml")) builder_obj.check_rpkgs() builder_obj.extend_conda_env() expectations = {"passed": 3, "warned": 1, "failed": 0} self.assess_builder_status(builder_obj, **expectations) self.assertEquals(len(builder_obj.conda_env.get("dependencies")), 3)