Fix incorrect comment in tests

This commit is contained in:
Devesh Kumar Singh 2020-04-10 14:43:33 +05:30
parent 9360793a6c
commit 528a193dda
3 changed files with 8 additions and 8 deletions

View File

@ -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)
@ -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)

View File

@ -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