From ba82209e67686c9ff15a4b1a125e7b373b51444d Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Fri, 3 Jun 2022 23:41:57 +0530 Subject: [PATCH] Remove tests that checked if specific R packages were installed --- repo2docker/buildpacks/r.py | 6 +---- tests/unit/test_r.py | 47 ------------------------------------- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/repo2docker/buildpacks/r.py b/repo2docker/buildpacks/r.py index 4378c7a7..a0053ee7 100644 --- a/repo2docker/buildpacks/r.py +++ b/repo2docker/buildpacks/r.py @@ -38,11 +38,7 @@ class RBuildPack(PythonBuildPack): - are needed by a specific tool - The `r-base-core` package from Ubuntu or "Ubuntu packages for R" - apt repositories is used to install R itself, - rather than any of the methods from https://cran.r-project.org/. - - The `r-base-dev` package is installed as advised in RStudio instructions. + R is installed from https://docs.rstudio.com/resources/install-r/ """ @property diff --git a/tests/unit/test_r.py b/tests/unit/test_r.py index f2c85041..a9e9191a 100644 --- a/tests/unit/test_r.py +++ b/tests/unit/test_r.py @@ -104,50 +104,3 @@ def test_snapshot_mran_date(requested, expected): assert r.get_mran_snapshot_url( requested ) == "https://mran.microsoft.com/snapshot/{}".format(expected.isoformat()) - - -def test_install_from_base(tmpdir): - # check that for R==3.4 we install from ubuntu - tmpdir.chdir() - - with open("runtime.txt", "w") as f: - f.write("r-3.4-2019-01-02") - - r = buildpacks.RBuildPack() - assert "r-base" in r.get_packages() - - -def test_install_from_cran_apt_repo(tmpdir): - # check that for R>3.4 we don't install r-base from Ubuntu - tmpdir.chdir() - - with open("runtime.txt", "w") as f: - f.write("r-3.5-2019-01-02") - - r = buildpacks.RBuildPack() - assert "r-base" not in r.get_packages() - - -def test_custom_cran_apt_repo(tmpdir): - tmpdir.chdir() - - with open("runtime.txt", "w") as f: - f.write("r-3.5-2019-01-02") - - r = buildpacks.RBuildPack() - - scripts = r.get_build_scripts() - - # check that at least one of the build scripts adds this new apt repository - for user, script in scripts: - if "https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" in script: - break - else: - assert False, "Should have added a new apt repository" - - # check that we install the right package - for user, script in scripts: - if "r-base-core=3.5" in script: - break - else: - assert False, "Should have installed base R"