Skip to content

Commit

Permalink
Bump up versions in deps-only tests. (conda#11236)
Browse files Browse the repository at this point in the history
This should work around the issues with the old Python 3.6 metadata.
  • Loading branch information
jezdez authored Feb 18, 2022
1 parent 2744d4a commit b039ae2
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,40 +1256,40 @@ def test_create_only_deps_flag(self):
assert not package_is_installed(prefix, 'flask')

def test_install_update_deps_flag(self):
with make_temp_env("flask=0.12", "jinja2=2.9") as prefix:
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask=0.12")
assert package_is_installed(prefix, "jinja2=2.9")
with make_temp_env("flask=2.0.1", "jinja2=3.0.1") as prefix:
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask=2.0.1")
assert package_is_installed(prefix, "jinja2=3.0.1")

run_command(Commands.INSTALL, prefix, "flask", "--update-deps")
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask>0.12")
assert package_is_installed(prefix, "jinja2>2.9")
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask>2.0.1")
assert package_is_installed(prefix, "jinja2>3.0.1")

def test_install_only_deps_flag(self):
with make_temp_env("flask=0.12.2", "jinja2=2.9") as prefix:
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask=0.12.2")
assert package_is_installed(prefix, "jinja2=2.9")
with make_temp_env("flask=2.0.2", "jinja2=3.0.2") as prefix:
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask=2.0.2")
assert package_is_installed(prefix, "jinja2=3.0.2")

run_command(Commands.INSTALL, prefix, "flask", "--only-deps")
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask=0.12.2")
assert package_is_installed(prefix, "jinja2=2.9")
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask=2.0.2")
assert package_is_installed(prefix, "jinja2=3.0.2")

with make_temp_env("flask==0.12.2", "--only-deps") as prefix:
with make_temp_env("flask==2.0.2", "--only-deps") as prefix:
assert not package_is_installed(prefix, "flask")

def test_install_update_deps_only_deps_flags(self):
with make_temp_env("flask=0.12.2", "jinja2=2.9") as prefix:
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask=0.12.2")
assert package_is_installed(prefix, "jinja2=2.9")

run_command(Commands.INSTALL, prefix, "flask", "python=3.6", "--update-deps", "--only-deps")
assert package_is_installed(prefix, "python=3.6")
assert package_is_installed(prefix, "flask=0.12.2")
assert package_is_installed(prefix, "jinja2>2.9")
with make_temp_env("flask=2.0.1", "jinja2=3.0.1") as prefix:
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask=2.0.1")
assert package_is_installed(prefix, "jinja2=3.0.1")

run_command(Commands.INSTALL, prefix, "flask", "python=3.9", "--update-deps", "--only-deps")
assert package_is_installed(prefix, "python=3.9")
assert package_is_installed(prefix, "flask=2.0.1")
assert package_is_installed(prefix, "jinja2>3.0.1")


@pytest.mark.xfail(on_win, reason="nomkl not present on windows",
Expand Down

0 comments on commit b039ae2

Please sign in to comment.