Skip to content

Commit f1b1339

Browse files
committed
ci: refactor conda tests, from 6 to 5 (~5 min saved)
With this commit, we combine testing the default python version installation into the default R version installation test.
1 parent f69d65f commit f1b1339

File tree

10 files changed

+13
-22
lines changed

10 files changed

+13
-22
lines changed

tests/conda/py-postbuild/README.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/conda/py-postbuild/environment.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/conda/py-postbuild/verify

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/conda/r-postbuild/README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Default R, default Python, and a postBuild file
2+
-----------------------------------------------
3+
4+
We test the default R and Python version set by repo2docker as used when an
5+
environment.yml file is provided without a ``python`` or ``r-base`` dependency
6+
pinned, and the use of a ``postBuild`` file.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dependencies:
2+
- pytest
23
- r-base
34
- r-digest

tests/conda/r/verify renamed to tests/conda/r-postbuild/verify

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ R -e "library('digest')"
88
# Fail if version is not at least 4.2
99
R --version
1010
R -e 'if (!(version$major == "4" && as.double(version$minor) >= 2)) quit("yes", 1)'
11+
12+
pytest --verbose --color=yes ./verify.py

tests/conda/py-postbuild/verify.py renamed to tests/conda/r-postbuild/verify.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55

66
def test_sys_version():
7+
"""The default python version should be 3.7"""
78
assert sys.version_info[:2] == (3, 7)
89

910

10-
def test_numpy():
11-
import numpy
12-
13-
1411
def test_there():
12+
"""there is to be installed via postBuild"""
1513
import there
1614

1715

tests/conda/r/README.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/conda/r3.6-extra-args/verify.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
assert sys.executable.startswith("/srv/conda/"), sys.executable
1111

1212
# Repo should be in /srv/repo
13-
assert os.path.exists("/srv/repo/verify")
14-
assert os.path.abspath(__file__) == "/srv/repo/verify"
13+
assert os.path.exists("/srv/repo/verify.py")
14+
assert os.path.abspath(__file__) == "/srv/repo/verify.py"
1515

1616
# Repo should be writable
1717
assert os.access("/srv/repo", os.W_OK)

0 commit comments

Comments
 (0)