<s> import unittest <EOL> from . context import songtext <EOL> class LyricsNMusicTests ( unittest . TestCase ) : <EOL> def get_args ( self , arg_string ) : <EOL> arg_string += '<STR_LIT>' <EOL> parser = songtext . get_parser ( ) <EOL> args = vars ( parser . parse_args ( arg_string . split ( '<STR_LIT:U+0020>' ) ) ) <EOL> return args <EOL> def test_get_single_result_with_artist_and_song_title ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_single_result_with_artist_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_single_result_with_song_title_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_single_result_with_words_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_list_result_with_artist_and_song_title ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_list_result_with_artist_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_list_result_with_song_title_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_get_list_result_with_words_only ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> class LyricWikiTests ( unittest . TestCase ) : <EOL> def get_args ( self , arg_string ) : <EOL> arg_string += '<STR_LIT>' <EOL> parser = songtext . get_parser ( ) <EOL> args = vars ( parser . parse_args ( arg_string . split ( '<STR_LIT:U+0020>' ) ) ) <EOL> return args <EOL> def test_get_single_result_with_artist_and_song_title ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:0> ) <EOL> def test_searching_with_list_option_fails ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:1> ) <EOL> def test_searching_with_words_option_fails ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:1> ) <EOL> def test_searching_with_artist_only_fails ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:1> ) <EOL> def test_searching_with_song_title_only_fails ( self ) : <EOL> arg_dict = self . get_args ( '<STR_LIT>' ) <EOL> ret_value = songtext . get_song_lyrics ( arg_dict ) <EOL> self . assertEqual ( ret_value , <NUM_LIT:1> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
