def test_uninstall_editable_and_pip_install(script, data):
 script.environ['SETUPTOOLS_SYS_PATH_TECHNIQUE'] = 'raw'
 pkg_path = data.packages.join('FSPkg')
 script.pip('install', '-e', '.', expect_stderr=True, cwd=pkg_path)
 script.pip('install', '--ignore-installed', '.', expect_stderr=True, cwd=pkg_path)
 list_result = script.pip('list', '--format=legacy')
 assert ('FSPkg (0.1.dev0, ' in list_result.stdout)
 uninstall = script.pip('uninstall', 'FSPkg', '-y')
 assert (not any((filename.endswith('.egg-link') for filename in uninstall.files_deleted.keys())))
 uninstall2 = script.pip('uninstall', 'FSPkg', '-y')
 assert (join(script.site_packages, 'FSPkg.egg-link') in uninstall2.files_deleted), list(uninstall2.files_deleted.keys())
 list_result2 = script.pip('list', '--format=legacy')
 assert ('FSPkg' not in list_result2.stdout)

def test_uninstall_editable_and_pip_install ( script , data ) : script . environ [ 'SETUPTOOLS_SYS_PATH_TECHNIQUE' ] = 'raw' pkg_path = data . packages . join ( 'FSPkg' ) script . pip ( 'install' , '-e' , '.' , expect_stderr = True , cwd = pkg_path ) script . pip ( 'install' , '--ignore-installed' , '.' , expect_stderr = True , cwd = pkg_path ) list_result = script . pip ( 'list' , '--format=legacy' ) assert ( 'FSPkg (0.1.dev0, ' in list_result . stdout ) uninstall = script . pip ( 'uninstall' , 'FSPkg' , '-y' ) assert ( not any ( ( filename . endswith ( '.egg-link' ) for filename in uninstall . files_deleted . keys ( ) ) ) ) uninstall2 = script . pip ( 'uninstall' , 'FSPkg' , '-y' ) assert ( join ( script . site_packages , 'FSPkg.egg-link' ) in uninstall2 . files_deleted ) , list ( uninstall2 . files_deleted . keys ( ) ) list_result2 = script . pip ( 'list' , '--format=legacy' ) assert ( 'FSPkg' not in list_result2 . stdout )
try uninstall after pip install -e after pip install .