diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-08 08:34:55 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-08 08:34:55 -0400 |
commit | 00ad428894d65857bb85ee99d3deff578c69faf3 (patch) | |
tree | 59f835e09c289da0b62aa66350050d96114047cc /tests/test_conda.py | |
parent | 8be522461c0a0050666790ee782a8a1b7bb2a3b8 (diff) | |
download | delivery_merge-00ad428894d65857bb85ee99d3deff578c69faf3.tar.gz |
Initial commit of tests
Diffstat (limited to 'tests/test_conda.py')
-rw-r--r-- | tests/test_conda.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_conda.py b/tests/test_conda.py new file mode 100644 index 0000000..6dfa4de --- /dev/null +++ b/tests/test_conda.py @@ -0,0 +1,26 @@ +import os +import pytest +from delivery_merge import conda + + +class TestConda: + def setup_class(self): + self.version = '4.5.12' + self.prefix = conda.conda_installer(self.version) + assert os.path.exists(self.prefix) + + def teardown_class(self): + pass + + def test_init_path(self): + conda.conda_init_path(self.prefix) + assert os.environ.get('PATH', '').startswith(self.prefix) + + def test_shell_wrapper(self): + output = conda.conda('info').stdout.decode() + assert self.prefix in output + assert self.version in output + + def test_env_load(self): + with conda.conda_env_load('base') as _: + assert os.environ.get('CONDA_PREFIX', '') |