def test_input(self): # With a short sentence results = {'swedish': 0, 'danish': 0, 'hungarian': 0, 'finnish': 0, 'portuguese': 0, 'german': 0, 'dutch': 0, 'french': 0, 'spanish': 0, 'norwegian': 0, 'english': 0, 'russian': 0, 'turkish': 0, 'italian': 0} assert calculate_language_scores("Hello world") == results # With more info results['english'] = 3 assert calculate_language_scores("Hello world, how are you?") == results
def test_input(self): # With a short sentence results = { 'swedish': 0, 'danish': 0, 'hungarian': 0, 'finnish': 0, 'portuguese': 0, 'german': 0, 'dutch': 0, 'french': 0, 'spanish': 0, 'norwegian': 0, 'english': 0, 'russian': 0, 'turkish': 0, 'italian': 0 } assert calculate_language_scores("Hello world") == results # With more info results['english'] = 3 assert calculate_language_scores( "Hello world, how are you?") == results
def test_empty_input(self): assert calculate_language_scores("") == {}