def test_simple_uninstall_distutils(script):
 script.scratch_path.join('distutils_install').mkdir()
 pkg_path = (script.scratch_path / 'distutils_install')
 pkg_path.join('setup.py').write(textwrap.dedent("\n        from distutils.core import setup\n        setup(\n            name='distutils-install',\n            version='0.1',\n        )\n    "))
 result = script.run('python', (pkg_path / 'setup.py'), 'install')
 result = script.pip('list', '--format=legacy')
 assert ('distutils-install (0.1)' in result.stdout)
 script.pip('uninstall', 'distutils_install', '-y', expect_stderr=True)
 result2 = script.pip('list', '--format=legacy')
 assert ('distutils-install (0.1)' not in result2.stdout)

def test_simple_uninstall_distutils ( script ) : script . scratch_path . join ( 'distutils_install' ) . mkdir ( ) pkg_path = ( script . scratch_path / 'distutils_install' ) pkg_path . join ( 'setup.py' ) . write ( textwrap . dedent ( "\n        from distutils.core import setup\n        setup(\n            name='distutils-install',\n            version='0.1',\n        )\n    " ) ) result = script . run ( 'python' , ( pkg_path / 'setup.py' ) , 'install' ) result = script . pip ( 'list' , '--format=legacy' ) assert ( 'distutils-install (0.1)' in result . stdout ) script . pip ( 'uninstall' , 'distutils_install' , '-y' , expect_stderr = True ) result2 = script . pip ( 'list' , '--format=legacy' ) assert ( 'distutils-install (0.1)' not in result2 . stdout )
test simple install and uninstall .