kopia lustrzana https://github.com/jupyterhub/repo2docker
Updated test_env_yml.py file
rodzic
709ac4c757
commit
63e459664c
|
@ -6,18 +6,20 @@ import sys
|
|||
import pytest
|
||||
from repo2docker import buildpacks
|
||||
|
||||
#@pytest.mark.xfail(reason="Not yet implemented")
|
||||
|
||||
def test_empty_env_yml(tmpdir):
|
||||
tmpdir.chdir()
|
||||
p = tmpdir.join("environment.yml")
|
||||
p.write("")
|
||||
bp = buildpacks.CondaBuildPack()
|
||||
with pytest.raises(Exception):
|
||||
py_ver = bp.python_version()
|
||||
py_ver = bp.python_version
|
||||
# If the environment.yml is empty python_version will get an empty string
|
||||
assert py_ver == ''
|
||||
|
||||
def test_no_dict_env_yml(tmpdir):
|
||||
tmpdir.chdir()
|
||||
q = tmpdir.join("environment.yml")
|
||||
q.write("list/n ,string")
|
||||
bq = buildpacks.CondaBuildPack()
|
||||
with pytest.raises(Exception):
|
||||
py_ver = bq.python_version()
|
||||
with pytest.raises(TypeError):
|
||||
py_ver = bq.python_version
|
Ładowanie…
Reference in New Issue