"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/test_create.py" between
conda-4.6.2.tar.gz and conda-4.6.3.tar.gz

About: Conda is a cross-platform, language-agnostic, system-level binary package manager and ecosystem.

test_create.py  (conda-4.6.2):test_create.py  (conda-4.6.3)
skipping to change at line 1682 skipping to change at line 1682
response = requests.get("https://conda.anaconda.org/t/cqgccfm1mfma/data- portal/" response = requests.get("https://conda.anaconda.org/t/cqgccfm1mfma/data- portal/"
"%s/repodata.json" % context.subdir) "%s/repodata.json" % context.subdir)
assert response.status_code == 200 assert response.status_code == 200
try: try:
prefix = make_temp_prefix(str(uuid4())[:7]) prefix = make_temp_prefix(str(uuid4())[:7])
channel_url = "https://conda.anaconda.org/t/cqgccfm1mfma/data-portal " channel_url = "https://conda.anaconda.org/t/cqgccfm1mfma/data-portal "
run_command(Commands.CONFIG, prefix, "--add channels %s" % channel_u rl) run_command(Commands.CONFIG, prefix, "--add channels %s" % channel_u rl)
stdout, stderr = run_command(Commands.CONFIG, prefix, "--show") stdout, stderr = run_command(Commands.CONFIG, prefix, "--show")
yml_obj = yaml_load(stdout) yml_obj = yaml_load(stdout)
assert yml_obj['channels'] == [channel_url, 'defaults'] assert yml_obj['channels'] == [channel_url.replace('cqgccfm1mfma', ' <TOKEN>'), 'defaults']
with pytest.raises(PackagesNotFoundError): with pytest.raises(PackagesNotFoundError):
run_command(Commands.SEARCH, prefix, "boltons", "--json") run_command(Commands.SEARCH, prefix, "boltons", "--json")
stdout, stderr = run_command(Commands.SEARCH, prefix, "anaconda-mosa ic", "--json") stdout, stderr = run_command(Commands.SEARCH, prefix, "anaconda-mosa ic", "--json")
json_obj = json.loads(stdout) json_obj = json.loads(stdout)
assert "anaconda-mosaic" in json_obj assert "anaconda-mosaic" in json_obj
assert len(json_obj["anaconda-mosaic"]) > 0 assert len(json_obj["anaconda-mosaic"]) > 0
skipping to change at line 1733 skipping to change at line 1733
reset_context() reset_context()
# Step 2. Now with the token make sure we can see the anyjson package # Step 2. Now with the token make sure we can see the anyjson package
try: try:
prefix = make_temp_prefix(str(uuid4())[:7]) prefix = make_temp_prefix(str(uuid4())[:7])
channel_url = "https://conda.anaconda.org/t/zlZvSlMGN7CB/kalefranz" channel_url = "https://conda.anaconda.org/t/zlZvSlMGN7CB/kalefranz"
run_command(Commands.CONFIG, prefix, "--add channels %s" % channel_u rl) run_command(Commands.CONFIG, prefix, "--add channels %s" % channel_u rl)
run_command(Commands.CONFIG, prefix, "--remove channels defaults") run_command(Commands.CONFIG, prefix, "--remove channels defaults")
stdout, stderr = run_command(Commands.CONFIG, prefix, "--show") stdout, stderr = run_command(Commands.CONFIG, prefix, "--show")
yml_obj = yaml_load(stdout) yml_obj = yaml_load(stdout)
assert yml_obj['channels'] == [channel_url]
assert yml_obj['channels'] == ["https://conda.anaconda.org/t/<TOKEN>
/kalefranz"]
stdout, stderr = run_command(Commands.SEARCH, prefix, "anyjson", "-- platform", stdout, stderr = run_command(Commands.SEARCH, prefix, "anyjson", "-- platform",
"linux-64", "--json") "linux-64", "--json")
json_obj = json_loads(stdout) json_obj = json_loads(stdout)
assert 'anyjson' in json_obj assert 'anyjson' in json_obj
finally: finally:
rmtree(prefix, ignore_errors=True) rmtree(prefix, ignore_errors=True)
def test_clean_index_cache(self): def test_clean_index_cache(self):
skipping to change at line 2142 skipping to change at line 2143
assert conda_info["conda_version"] == "4.5.12" assert conda_info["conda_version"] == "4.5.12"
@pytest.mark.skipif(on_win, reason="openssl only has a postlink script on un ix") @pytest.mark.skipif(on_win, reason="openssl only has a postlink script on un ix")
def test_run_script_called(self): def test_run_script_called(self):
import conda.core.link import conda.core.link
with patch.object(conda.core.link, 'subprocess_call') as rs: with patch.object(conda.core.link, 'subprocess_call') as rs:
with make_temp_env("openssl=1.0.2j --no-deps") as prefix: with make_temp_env("openssl=1.0.2j --no-deps") as prefix:
assert package_is_installed(prefix, 'openssl') assert package_is_installed(prefix, 'openssl')
assert rs.call_count == 1 assert rs.call_count == 1
def test_post_link_run_in_env(self):
test_pkg = '_conda_test_env_activated_when_post_link_executed'
# a non-unicode name must be provided here as activate.d scripts
# are not execuated on windows, see https://github.com/conda/conda/issue
s/8241
with make_temp_env(test_pkg, '-c conda-test', name='post_link_test') as
prefix:
assert package_is_installed(prefix, test_pkg)
def test_conda_info_python(self): def test_conda_info_python(self):
stdout, stderr = run_command(Commands.INFO, None, "python=3.5") stdout, stderr = run_command(Commands.INFO, None, "python=3.5")
assert "python 3.5.1 0" in stdout assert "python 3.5.1 0" in stdout
def test_toolz_cytoolz_package_cache_regression(self): def test_toolz_cytoolz_package_cache_regression(self):
with make_temp_env("python=3.5") as prefix: with make_temp_env("python=3.5") as prefix:
pkgs_dir = join(prefix, 'pkgs') pkgs_dir = join(prefix, 'pkgs')
with env_var('CONDA_PKGS_DIRS', pkgs_dir, reset_context): with env_var('CONDA_PKGS_DIRS', pkgs_dir, reset_context):
assert context.pkgs_dirs == (pkgs_dir,) assert context.pkgs_dirs == (pkgs_dir,)
run_command(Commands.INSTALL, prefix, "-c conda-forge toolz cyto olz") run_command(Commands.INSTALL, prefix, "-c conda-forge toolz cyto olz")
 End of changes. 3 change blocks. 
2 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)