def test_evaluate_array(self): a = Polynomial([5, 3, 1, 1, 6, 8]) arr, sum = a.evaluate_array(3) self.assertEqual(sum, 1520) self.assertEqual(list(arr), [1215, 243, 27, 9, 18, 8])
def test_evaluate_array(self): a = Polynomial([5,3,1,1,6,8]) arr, sum = a.evaluate_array(3) self.assertEqual(sum, 1520) self.assertEqual(list(arr), [1215, 243, 27, 9, 18, 8])
def test_evaluate_array(self): a = Polynomial(map(GF2int, [5, 3, 1, 1, 6, 8])) arr, sum = a.evaluate_array(3) self.assertEqual(sum, 196) self.assertEqual(list(arr), [255, 51, 15, 5, 10, 8])
def test_evaluate_array(self): a = Polynomial(map(GF2int, [5,3,1,1,6,8])) arr, sum = a.evaluate_array(3) self.assertEqual(sum, 196) self.assertEqual(list(arr), [255, 51, 15, 5, 10, 8])