'``VirtualEnv.install`` accepts a ``PythonPackage`` instance and
installs it.'

def test_install(self):

    virtualenv_dir = FilePath(self.mktemp())
    virtualenv = create_virtualenv(root=virtualenv_dir)
    package_dir = FilePath(self.mktemp())
    package = canned_package(package_dir)
    virtualenv.install(package_dir.path)
    self.assertIn('{}-{}-py2.7.egg-info'.format(package.name, package.version), [f.basename() for f in virtualenv_dir.descendant(['lib', 'python2.7', 'site-packages']).children()])
