def test_columns_flag(script, data):
 script.pip('install', '-f', data.find_links, '--no-index', 'simple==1.0', 'simple2==3.0')
 result = script.pip('list', '--format=columns')
 assert ('Package' in result.stdout), str(result)
 assert ('Version' in result.stdout), str(result)
 assert ('simple (1.0)' not in result.stdout), str(result)
 assert ('simple     1.0' in result.stdout), str(result)
 assert ('simple2    3.0' in result.stdout), str(result)

def test_columns_flag ( script , data ) : script . pip ( 'install' , '-f' , data . find_links , '--no-index' , 'simple==1.0' , 'simple2==3.0' ) result = script . pip ( 'list' , '--format=columns' ) assert ( 'Package' in result . stdout ) , str ( result ) assert ( 'Version' in result . stdout ) , str ( result ) assert ( 'simple (1.0)' not in result . stdout ) , str ( result ) assert ( 'simple     1.0' in result . stdout ) , str ( result ) assert ( 'simple2    3.0' in result . stdout ) , str ( result )
test the list command with the --format=columns option .