Skip to content

Commit

Permalink
Merge pull request #8304 from pfmoore/revert_8298
Browse files Browse the repository at this point in the history
Revert "Account for package casing in new resolver"
  • Loading branch information
pfmoore committed May 22, 2020
2 parents 5d62341 + 16d45b6 commit cbdf5b1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/functional/test_install_config.py
Expand Up @@ -7,6 +7,7 @@
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 @@ -15,9 +16,10 @@ 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)

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


def test_command_line_options_override_env_vars(script, virtualenv):
Expand All @@ -42,6 +44,7 @@ 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 @@ -65,7 +68,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.lower()
assert "Successfully installed INITools" in result.stdout


@pytest.mark.network
Expand Down Expand Up @@ -173,6 +176,7 @@ 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 @@ -185,8 +189,10 @@ 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)
err = "distributionnotfound: no matching distribution found for initools"
assert err in result.stdout.lower()
assert (
"DistributionNotFound: No matching distribution found for INITools"
in result.stdout
)


def test_install_no_binary_via_config_disables_cached_wheels(
Expand Down

0 comments on commit cbdf5b1

Please sign in to comment.