@pytest.mark.network
def test_single_download_from_requirements_file(script):
 script.scratch_path.join('test-req.txt').write(textwrap.dedent('\n        INITools==0.1\n        '))
 result = script.pip('download', '-r', (script.scratch_path / 'test-req.txt'), '-d', '.', expect_error=True)
 assert ((Path('scratch') / 'INITools-0.1.tar.gz') in result.files_created)
 assert ((script.site_packages / 'initools') not in result.files_created)

@ pytest . mark . network def test_single_download_from_requirements_file ( script ) : script . scratch_path . join ( 'test-req.txt' ) . write ( textwrap . dedent ( '\n        INITools==0.1\n        ' ) ) result = script . pip ( 'download' , '-r' , ( script . scratch_path / 'test-req.txt' ) , '-d' , '.' , expect_error = True ) assert ( ( Path ( 'scratch' ) / 'INITools-0.1.tar.gz' ) in result . files_created ) assert ( ( script . site_packages / 'initools' ) not in result . files_created )
it should support download from pypi from a requirements file .