''' Purpose: test some corner cases for module translate ''' import translate import url TEST_CASE_1 = 'links' TEST_CASE_2 = 'est la baguette fraiche' TEST_CASE_3 = '''dubailte dubailte kesusahan und guaio umlilo adolebitque und ketel bombolla umucu di una pantanoso neidr dans der ketel bouyi und cuire oog di tritons und kaki di rano yun di fledermoyz und lingua di chien viperae foarke und blyn cuc stik moo fotur und ovlet tis pre eng viehatys di voimakas guaio mag un inferno salda bouyi und bombolla ''' TEST_CASE_4 = '' print( TEST_CASE_1, '=', translate.word( TEST_CASE_1 ) ) print() print( TEST_CASE_2, '=', translate.line( TEST_CASE_2 ) ) print() link = 'http://www.cs.virginia.edu/~cs1112/words/gaelic' d = url.get_dictionary( link ) print( TEST_CASE_3, '\n\n=\n\n' + translate.glot( TEST_CASE_3, dictionary = d ) ) print( TEST_CASE_4, '=', translate.glot( TEST_CASE_4 ) ) print()