コード例 #1
0
 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()
コード例 #2
0
 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)
コード例 #3
0
 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)
コード例 #4
0
 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)