def test_normalize_result(self): result = result_normalize([[8, 8], [28, 28]], 28) self.assertIsInstance(result, GeneratorType) lst = list(result) self.assertEquals(lst[0], 8) self.assertEquals(lst[20], 28) self.assertEquals(len(lst), 28)
def test_normalize_result(self): result = result_normalize([[28, 28], [8, 8]], 28) self.assertIsInstance(result, GeneratorType) lst = list(result) self.assertEqual(lst[0], 8) self.assertEqual(lst[1], 0) self.assertEqual(lst[20], 28) self.assertEqual(len(lst), 28)