def test_array_by_array(self): self.assertEqual(MathsUtil.arr_by_arr([1, 2, 3], [1, 0, 3, 5]), []) self.assertEqual(MathsUtil.arr_by_arr([-1, -2, -3, 4], [-1, 2, 3]), [])
def test_array_by_array(self): self.assertEqual(MathsUtil.arr_by_arr([1, 2, 3], [1, 0, 3]), [1, 0, 9]) self.assertEqual(MathsUtil.arr_by_arr([-1, -2, -3], [-1, 2, 3]), [1, -4, -9]) self.assertEqual(MathsUtil.arr_by_arr([2, 2.6, 3.02], [1.5, 2, 3]), [3, 5.2, 9.06])