Add function to install packages from pip too

This commit is contained in:
yuvipanda
2018-06-26 17:38:56 -07:00
parent 92558e913e
commit f7813a9385
2 changed files with 28 additions and 0 deletions

View File

@@ -51,3 +51,18 @@ def test_ensure_packages(prefix):
'-c',
'import numpy'
])
def test_ensure_pip_packages(prefix):
"""
Test installing pip packages in conda environment
"""
conda.ensure_conda_env(prefix)
conda.ensure_conda_packages(prefix, ['pip'])
conda.ensure_pip_packages(prefix, ['numpy'])
# Throws an error if this fails
subprocess.check_call([
os.path.join(prefix, 'bin', 'python'),
'-c',
'import numpy'
])