@pytest.mark.network
def test_download_if_requested(script):
 result = script.pip('install', 'INITools==0.1', '-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_download_if_requested ( script ) : result = script . pip ( 'install' , 'INITools==0.1' , '-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 download and not install if requested .