Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect comment in tests in test_install #8012

Merged
merged 1 commit into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
14 changes: 7 additions & 7 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,15 +1855,16 @@ def test_install_skip_work_dir_pkg(script, data):
and an uninstall
"""

# Create a test package and install it
# Create a test package, install it and then uninstall it
pkg_path = create_test_package_with_setup(
script, name='simple', version='1.0')
script.pip('install', '-e', '.',
expect_stderr=True, cwd=pkg_path)

# Uninstalling the package and installing it again will succeed
script.pip('uninstall', 'simple', '-y')

# Running the install command again from the working directory
# will install the package as it was uninstalled earlier
result = script.pip('install', '--find-links',
data.find_links, 'simple',
expect_stderr=True, cwd=pkg_path)
Expand All @@ -1879,19 +1880,18 @@ def test_install_include_work_dir_pkg(script, data):
if working directory is added in PYTHONPATH
"""

# Create a test package and install it
# Create a test package, install it and then uninstall it
pkg_path = create_test_package_with_setup(
script, name='simple', version='1.0')
script.pip('install', '-e', '.',
expect_stderr=True, cwd=pkg_path)

# Uninstall will fail with given warning
script.pip('uninstall', 'simple', '-y')

script.environ.update({'PYTHONPATH': pkg_path})

# Uninstalling the package and installing it again will fail,
# when package directory is in PYTHONPATH
# Running the install command again from the working directory
# will be a no-op, as the package is found to be installed,
# when the package directory is in PYTHONPATH
result = script.pip('install', '--find-links',
data.find_links, 'simple',
expect_stderr=True, cwd=pkg_path)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ def test_list_include_work_dir_pkg(script):
script.run('python', 'setup.py', 'egg_info',
expect_stderr=True, cwd=pkg_path)

# Add PYTHONPATH env variable
script.environ.update({'PYTHONPATH': pkg_path})

# List should include package simple when run from package directory
# when the package directory is in PYTHONPATH
result = script.pip('list', '--format=json', cwd=pkg_path)
json_result = json.loads(result.stdout)
assert {'name': 'simple', 'version': '1.0'} in json_result