<s> """<STR_LIT>""" <EOL> import pytest <EOL> from choosealicense . cli import info <EOL> @ pytest . mark . usefixtures ( '<STR_LIT>' ) <EOL> class TestInfo ( ) : <EOL> def test_show_license_info ( self , runner ) : <EOL> all_the_licenses = { <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:11> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:9> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:7> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:8> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:5> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:9> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:7> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:7> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:10> ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <NUM_LIT:6> ) <EOL> } <EOL> for short_name , fullname_and_rules_number in all_the_licenses . items ( ) : <EOL> result = runner . invoke ( info , [ short_name ] ) <EOL> output , exit_code = result . output , result . exit_code <EOL> rules = output . split ( '<STR_LIT>' ) [ <NUM_LIT:1> ] . split ( '<STR_LIT:\n>' ) <EOL> flat_rules = sum ( [ item . split ( ) for item in rules ] , [ ] ) <EOL> fullname , rules_number = fullname_and_rules_number <EOL> assert exit_code == <NUM_LIT:0> <EOL> assert '<STR_LIT>' not in output <EOL> assert fullname in output <EOL> assert '<STR_LIT>' . format ( <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) in output <EOL> assert len ( flat_rules ) == rules_number <EOL> def test_show_invalid_license_info ( self , runner ) : <EOL> result = runner . invoke ( info , [ '<STR_LIT>' ] ) <EOL> output , exit_code = result . output , result . exit_code <EOL> assert exit_code != <NUM_LIT:0> <EOL> assert output == ( "<STR_LIT>" <EOL> "<STR_LIT>" ) </s>
