forked from conda/conda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_info.py
34 lines (27 loc) · 1.35 KB
/
test_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from __future__ import print_function, absolute_import, division
from conda import config
from tests.helpers import run_conda_command
def test_info():
conda_info_out, conda_info_err = run_conda_command('info')
assert conda_info_err == ''
for name in ['platform', 'conda version', 'root environment',
'default environment', 'envs directories', 'package cache',
'channel URLs', 'config file', 'is foreign system']:
assert name in conda_info_out
conda_info_e_out, conda_info_e_err = run_conda_command('info', '-e')
assert 'root' in conda_info_e_out
assert conda_info_e_err == ''
conda_info_s_out, conda_info_s_err = run_conda_command('info', '-s')
assert conda_info_s_err == ''
for name in ['sys.version', 'sys.prefix', 'sys.executable', 'conda location',
'conda-build', 'CIO_TEST', 'CONDA_DEFAULT_ENV', 'PATH', 'PYTHONPATH']:
assert name in conda_info_s_out
if config.platform == 'linux':
assert 'LD_LIBRARY_PATH' in conda_info_s_out
if config.platform == 'osx':
assert 'DYLD_LIBRARY_PATH' in conda_info_s_out
conda_info_all_out, conda_info_all_err = run_conda_command('info', '--all')
assert conda_info_all_err == ''
assert conda_info_out in conda_info_all_out
assert conda_info_e_out in conda_info_all_out
assert conda_info_s_out in conda_info_all_out