buonasera, lavorando sull homework 2 quando eseguo i test mi ritorna questo errore in 4 test su 17, ovvero che il mio return non è una lista anche se il mio unico return è effettivamente una lista e non ho altri modi di fare tornare al mio codice qualcosa di diverso da una lista.sapete come risolvere?
self = <test_01.Test testMethod=test_json4_00002_test_1000000_15_eng>
g1 = ['heartier', 'blenheim', 'forge', 'dopier', 'russell', 'majoring', ...]
g2 = ['seawards', 'draggles', 'goodman', 'stranglehold', 'obtention', 'revolutions', ...]
g3 = ['ragouts', 'fireplaces', 'vegetated', 'abbey', 'defrayable', 'senior', ...]
g4 = ['devolve', 'knelt', 'acclimatization', 'absenteeism', 'supposedly', 'hose', ...], hand_size = 15
num_letters = 1000000, expected = [408875, 407575, 406780, 408854]
@file_data("test_1M.json")
def test_json4(self, g1, g2, g3, g4, hand_size, num_letters, expected):
> return self.do_test(g1, g2, g3, g4, hand_size, num_letters, expected)
test_01.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_01.py:39: in do_test
self.assertEqual(type(result), list,
E AssertionError: <class 'NoneType'> != <class 'list'> : The output type should be: list
E [Il tipo di dato in output deve essere: list]
self = <test_01.Test testMethod=test_json4_00002_test_1000000_15_eng>
g1 = ['heartier', 'blenheim', 'forge', 'dopier', 'russell', 'majoring', ...]
g2 = ['seawards', 'draggles', 'goodman', 'stranglehold', 'obtention', 'revolutions', ...]
g3 = ['ragouts', 'fireplaces', 'vegetated', 'abbey', 'defrayable', 'senior', ...]
g4 = ['devolve', 'knelt', 'acclimatization', 'absenteeism', 'supposedly', 'hose', ...], hand_size = 15
num_letters = 1000000, expected = [408875, 407575, 406780, 408854]
@file_data("test_1M.json")
def test_json4(self, g1, g2, g3, g4, hand_size, num_letters, expected):
> return self.do_test(g1, g2, g3, g4, hand_size, num_letters, expected)
test_01.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_01.py:39: in do_test
self.assertEqual(type(result), list,
E AssertionError: <class 'NoneType'> != <class 'list'> : The output type should be: list
E [Il tipo di dato in output deve essere: list]