def test_relative_requirements_file(script, data):
 url = (path_to_url(os.path.join(data.root, 'packages', '..', 'packages', 'FSPkg')) + '#egg=FSPkg')
 script.scratch_path.join('file-egg-req.txt').write(textwrap.dedent(('        %s\n        ' % url)))
 result = script.pip('install', '-vvv', '-r', (script.scratch_path / 'file-egg-req.txt'))
 assert (((script.site_packages / 'FSPkg-0.1.dev0-py%s.egg-info') % pyversion) in result.files_created), str(result)
 assert ((script.site_packages / 'fspkg') in result.files_created), str(result.stdout)

def test_relative_requirements_file ( script , data ) : url = ( path_to_url ( os . path . join ( data . root , 'packages' , '..' , 'packages' , 'FSPkg' ) ) + '#egg=FSPkg' ) script . scratch_path . join ( 'file-egg-req.txt' ) . write ( textwrap . dedent ( ( '        %s\n        ' % url ) ) ) result = script . pip ( 'install' , '-vvv' , '-r' , ( script . scratch_path / 'file-egg-req.txt' ) ) assert ( ( ( script . site_packages / 'FSPkg-0.1.dev0-py%s.egg-info' ) % pyversion ) in result . files_created ) , str ( result ) assert ( ( script . site_packages / 'fspkg' ) in result . files_created ) , str ( result . stdout )
test installing from a requirements file with a relative path with an egg= definition .