def test_good_algo_option(script, tmpdir):
 expected = '--hash=sha512:9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043'
 result = script.pip('hash', '-a', 'sha512', _hello_file(tmpdir))
 assert (expected in str(result))

def test_good_algo_option ( script , tmpdir ) : expected = '--hash=sha512:9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043' result = script . pip ( 'hash' , '-a' , 'sha512' , _hello_file ( tmpdir ) ) assert ( expected in str ( result ) )
make sure the -a option works .