@pytest.mark.network
def test_uninstall_namespace_package(script):
 result = script.pip('install', 'pd.requires==0.0.3', expect_error=True)
 assert (join(script.site_packages, 'pd') in result.files_created), sorted(result.files_created.keys())
 result2 = script.pip('uninstall', 'pd.find', '-y', expect_error=True)
 assert (join(script.site_packages, 'pd') not in result2.files_deleted), sorted(result2.files_deleted.keys())
 assert (join(script.site_packages, 'pd', 'find') in result2.files_deleted), sorted(result2.files_deleted.keys())

@ pytest . mark . network def test_uninstall_namespace_package ( script ) : result = script . pip ( 'install' , 'pd.requires==0.0.3' , expect_error = True ) assert ( join ( script . site_packages , 'pd' ) in result . files_created ) , sorted ( result . files_created . keys ( ) ) result2 = script . pip ( 'uninstall' , 'pd.find' , '-y' , expect_error = True ) assert ( join ( script . site_packages , 'pd' ) not in result2 . files_deleted ) , sorted ( result2 . files_deleted . keys ( ) ) assert ( join ( script . site_packages , 'pd' , 'find' ) in result2 . files_deleted ) , sorted ( result2 . files_deleted . keys ( ) )
uninstall a distribution with a namespace package without clobbering the namespace and everything in it .