@@ -1855,15 +1855,16 @@ def test_install_skip_work_dir_pkg(script, data):
1855
1855
and an uninstall
1856
1856
"""
1857
1857
1858
- # Create a test package and install it
1858
+ # Create a test package, install it and then uninstall it
1859
1859
pkg_path = create_test_package_with_setup (
1860
1860
script , name = 'simple' , version = '1.0' )
1861
1861
script .pip ('install' , '-e' , '.' ,
1862
1862
expect_stderr = True , cwd = pkg_path )
1863
1863
1864
- # Uninstalling the package and installing it again will succeed
1865
1864
script .pip ('uninstall' , 'simple' , '-y' )
1866
1865
1866
+ # Running the install command again from the working directory
1867
+ # will install the package as it was uninstalled earlier
1867
1868
result = script .pip ('install' , '--find-links' ,
1868
1869
data .find_links , 'simple' ,
1869
1870
expect_stderr = True , cwd = pkg_path )
@@ -1879,19 +1880,18 @@ def test_install_include_work_dir_pkg(script, data):
1879
1880
if working directory is added in PYTHONPATH
1880
1881
"""
1881
1882
1882
- # Create a test package and install it
1883
+ # Create a test package, install it and then uninstall it
1883
1884
pkg_path = create_test_package_with_setup (
1884
1885
script , name = 'simple' , version = '1.0' )
1885
1886
script .pip ('install' , '-e' , '.' ,
1886
1887
expect_stderr = True , cwd = pkg_path )
1887
-
1888
- # Uninstall will fail with given warning
1889
1888
script .pip ('uninstall' , 'simple' , '-y' )
1890
1889
1891
1890
script .environ .update ({'PYTHONPATH' : pkg_path })
1892
1891
1893
- # Uninstalling the package and installing it again will fail,
1894
- # when package directory is in PYTHONPATH
1892
+ # Running the install command again from the working directory
1893
+ # will be a no-op, as the package is found to be installed,
1894
+ # when the package directory is in PYTHONPATH
1895
1895
result = script .pip ('install' , '--find-links' ,
1896
1896
data .find_links , 'simple' ,
1897
1897
expect_stderr = True , cwd = pkg_path )
0 commit comments