Skip to content

Commit

Permalink
Merge pull request #8012 from deveshks/fix-comments-in-test-install
Browse files Browse the repository at this point in the history
Fix incorrect comment in tests in test_install
  • Loading branch information
pradyunsg authored Apr 10, 2020
2 parents 3764736 + 528a193 commit 5c9e83a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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

0 comments on commit 5c9e83a

Please sign in to comment.