kopia lustrzana https://github.com/jupyterhub/repo2docker
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.pull/1188/head
rodzic
f69d65feb9
commit
f1b1339507
|
@ -1,6 +0,0 @@
|
|||
Default Python, and an postBuild file
|
||||
-------------------------------------
|
||||
|
||||
We test the default Python version set by repo2docker as used when an
|
||||
environment.yml file is provided without a ``python`` dependency, and the use of
|
||||
a ``postBuild`` file.
|
|
@ -1,3 +0,0 @@
|
|||
dependencies:
|
||||
- numpy
|
||||
- pytest
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
pytest -v ./verify.py
|
|
@ -0,0 +1,6 @@
|
|||
Default R, default Python, and a postBuild file
|
||||
-----------------------------------------------
|
||||
|
||||
We test the default R and Python version set by repo2docker as used when an
|
||||
environment.yml file is provided without a ``python`` or ``r-base`` dependency
|
||||
pinned, and the use of a ``postBuild`` file.
|
|
@ -1,3 +1,4 @@
|
|||
dependencies:
|
||||
- pytest
|
||||
- r-base
|
||||
- r-digest
|
|
@ -8,3 +8,5 @@ R -e "library('digest')"
|
|||
# Fail if version is not at least 4.2
|
||||
R --version
|
||||
R -e 'if (!(version$major == "4" && as.double(version$minor) >= 2)) quit("yes", 1)'
|
||||
|
||||
pytest --verbose --color=yes ./verify.py
|
|
@ -4,14 +4,12 @@ import sys
|
|||
|
||||
|
||||
def test_sys_version():
|
||||
"""The default python version should be 3.7"""
|
||||
assert sys.version_info[:2] == (3, 7)
|
||||
|
||||
|
||||
def test_numpy():
|
||||
import numpy
|
||||
|
||||
|
||||
def test_there():
|
||||
"""there is to be installed via postBuild"""
|
||||
import there
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
Default R
|
||||
---------
|
||||
|
||||
We test the default R version set by repo2docker as used when r-base is
|
||||
specified without a version in an environment.yml file.
|
|
@ -10,8 +10,8 @@ assert sys.executable == os.path.join(
|
|||
assert sys.executable.startswith("/srv/conda/"), sys.executable
|
||||
|
||||
# Repo should be in /srv/repo
|
||||
assert os.path.exists("/srv/repo/verify")
|
||||
assert os.path.abspath(__file__) == "/srv/repo/verify"
|
||||
assert os.path.exists("/srv/repo/verify.py")
|
||||
assert os.path.abspath(__file__) == "/srv/repo/verify.py"
|
||||
|
||||
# Repo should be writable
|
||||
assert os.access("/srv/repo", os.W_OK)
|
||||
|
|
Ładowanie…
Reference in New Issue