Remove tests that checked if specific R packages were installed

pull/1161/head
YuviPanda 2022-06-03 23:41:57 +05:30
rodzic c1ce8fd189
commit ba82209e67
2 zmienionych plików z 1 dodań i 52 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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"