def test_hashed_install_failure(script, data, tmpdir):
 with requirements_file('simple2==1.0 --hash=sha256:9336af72ca661e6336eb87bc7de3e8844d853e3848c2b9bbd2e8bf01db88c2c\n', tmpdir) as reqs_file:
  result = script.pip_install_local('-r', reqs_file.abspath, expect_error=True)
 assert (len(result.files_created) == 0)

def test_hashed_install_failure ( script , data , tmpdir ) : with requirements_file ( 'simple2==1.0 --hash=sha256:9336af72ca661e6336eb87bc7de3e8844d853e3848c2b9bbd2e8bf01db88c2c\n' , tmpdir ) as reqs_file : result = script . pip_install_local ( '-r' , reqs_file . abspath , expect_error = True ) assert ( len ( result . files_created ) == 0 )
test that wrong hashes stop installation .