Skip to content

Commit

Permalink
Account for package casing in new resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed May 22, 2020
1 parent 6aa9b89 commit 52c48a4
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions tests/functional/test_install_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tests.lib.server import file_response, package_page


@pytest.mark.fails_on_new_resolver
def test_options_from_env_vars(script):
"""
Test if ConfigOptionParser reads env vars (e.g. not using PyPI here)
Expand All @@ -16,10 +15,9 @@ def test_options_from_env_vars(script):
script.environ['PIP_NO_INDEX'] = '1'
result = script.pip('install', '-vvv', 'INITools', expect_error=True)
assert "Ignoring indexes:" in result.stdout, str(result)
assert (
"DistributionNotFound: No matching distribution found for INITools"
in result.stdout
)

err = "distributionnotfound: no matching distribution found for initools"
assert err in result.stdout.lower()


def test_command_line_options_override_env_vars(script, virtualenv):
Expand All @@ -44,7 +42,6 @@ def test_command_line_options_override_env_vars(script, virtualenv):


@pytest.mark.network
@pytest.mark.fails_on_new_resolver
def test_env_vars_override_config_file(script, virtualenv):
"""
Test that environmental variables override settings in config files.
Expand All @@ -68,7 +65,7 @@ def test_env_vars_override_config_file(script, virtualenv):
script.environ['PIP_NO_INDEX'] = '0'
virtualenv.clear()
result = script.pip('install', '-vvv', 'INITools')
assert "Successfully installed INITools" in result.stdout
assert "successfully installed initools" in result.stdout.lower()


@pytest.mark.network
Expand Down Expand Up @@ -176,7 +173,6 @@ def test_config_file_override_stack(
assert requests[3]["PATH_INFO"] == "/files/INITools-0.2.tar.gz"


@pytest.mark.fails_on_new_resolver
def test_options_from_venv_config(script, virtualenv):
"""
Test if ConfigOptionParser reads a virtualenv-local config file
Expand All @@ -189,10 +185,8 @@ def test_options_from_venv_config(script, virtualenv):
f.write(conf)
result = script.pip('install', '-vvv', 'INITools', expect_error=True)
assert "Ignoring indexes:" in result.stdout, str(result)
assert (
"DistributionNotFound: No matching distribution found for INITools"
in result.stdout
)
err = "distributionnotfound: no matching distribution found for initools"
assert err in result.stdout.lower()


def test_install_no_binary_via_config_disables_cached_wheels(
Expand Down

0 comments on commit 52c48a4

Please sign in to comment.