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
|
import pytest
|
||||||
from repo2docker import buildpacks
|
from repo2docker import buildpacks
|
||||||
|
|
||||||
#@pytest.mark.xfail(reason="Not yet implemented")
|
|
||||||
def test_empty_env_yml(tmpdir):
|
def test_empty_env_yml(tmpdir):
|
||||||
tmpdir.chdir()
|
tmpdir.chdir()
|
||||||
p = tmpdir.join("environment.yml")
|
p = tmpdir.join("environment.yml")
|
||||||
|
p.write("")
|
||||||
bp = buildpacks.CondaBuildPack()
|
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):
|
def test_no_dict_env_yml(tmpdir):
|
||||||
tmpdir.chdir()
|
tmpdir.chdir()
|
||||||
q = tmpdir.join("environment.yml")
|
q = tmpdir.join("environment.yml")
|
||||||
q.write("list/n ,string")
|
q.write("list/n ,string")
|
||||||
bq = buildpacks.CondaBuildPack()
|
bq = buildpacks.CondaBuildPack()
|
||||||
with pytest.raises(Exception):
|
with pytest.raises(TypeError):
|
||||||
py_ver = bq.python_version()
|
py_ver = bq.python_version
|
Ładowanie…
Reference in New Issue