@pytest.mark.network
def test_requirements_file(script):
 (other_lib_name, other_lib_version) = ('anyjson', '0.3')
 script.scratch_path.join('initools-req.txt').write(textwrap.dedent(('        INITools==0.2\n        # and something else to test out:\n        %s<=%s\n        ' % (other_lib_name, other_lib_version))))
 result = script.pip('install', '-r', (script.scratch_path / 'initools-req.txt'))
 assert (((script.site_packages / 'INITools-0.2-py%s.egg-info') % pyversion) in result.files_created)
 assert ((script.site_packages / 'initools') in result.files_created)
 assert result.files_created[(script.site_packages / other_lib_name)].dir
 fn = ('%s-%s-py%s.egg-info' % (other_lib_name, other_lib_version, pyversion))
 assert result.files_created[(script.site_packages / fn)].dir

@ pytest . mark . network def test_requirements_file ( script ) : ( other_lib_name , other_lib_version ) = ( 'anyjson' , '0.3' ) script . scratch_path . join ( 'initools-req.txt' ) . write ( textwrap . dedent ( ( '        INITools==0.2\n        # and something else to test out:\n        %s<=%s\n        ' % ( other_lib_name , other_lib_version ) ) ) ) result = script . pip ( 'install' , '-r' , ( script . scratch_path / 'initools-req.txt' ) ) assert ( ( ( script . site_packages / 'INITools-0.2-py%s.egg-info' ) % pyversion ) in result . files_created ) assert ( ( script . site_packages / 'initools' ) in result . files_created ) assert result . files_created [ ( script . site_packages / other_lib_name ) ] . dir fn = ( '%s-%s-py%s.egg-info' % ( other_lib_name , other_lib_version , pyversion ) ) assert result . files_created [ ( script . site_packages / fn ) ] . dir
test installing from a requirements file .