def test_all_fields(script):
 result = script.pip('show', 'pip')
 lines = result.stdout.splitlines()
 expected = set(['Name', 'Version', 'Summary', 'Home-page', 'Author', 'Author-email', 'License', 'Location', 'Requires'])
 actual = set((re.sub(':.*$', '', line) for line in lines))
 assert (actual == expected)

def test_all_fields ( script ) : result = script . pip ( 'show' , 'pip' ) lines = result . stdout . splitlines ( ) expected = set ( [ 'Name' , 'Version' , 'Summary' , 'Home-page' , 'Author' , 'Author-email' , 'License' , 'Location' , 'Requires' ] ) actual = set ( ( re . sub ( ':.*$' , '' , line ) for line in lines ) ) assert ( actual == expected )
test that all the fields are present .