def test_radd_deg0_deq0_zero_polynome(self): # Arrange firstPol = Polynome([0]) second = Polynome([0]) # Act eq = firstPol.__radd__(second) # Assert self.assertEqual(str(eq), '0')
def test_radd_deg2_deq2_0polynome(self): # Arrange firstPol = Polynome([22, 14, -20]) secondPol = Polynome([-22, -14, 30]) # Act eq = firstPol.__radd__(secondPol) # Assert self.assertEqual(str(eq), '10')
def test_radd_deg2_deq0_2polynome(self): # Arrange firstPol = Polynome([2, 100, -25]) second = Polynome([0]) # Act eq = firstPol.__radd__(second) # Assert self.assertEqual(str(eq), '2x^2 + 100x - 25')
def test_radd_deg2_deg2_zero_polynome(self): # Arrange firstPol = Polynome([-112, -771, -892]) secondPol = Polynome([112, 771, 892]) # Act eq = firstPol.__radd__(secondPol) # Assert self.assertEqual(str(eq), '0')
def test_radd_deg3_deg3_1polynome(self): # Arrange firstPol = Polynome([-6, -8, -1, 0]) secondPol = Polynome([6, 8, 8, 7]) # Act eq = firstPol.__radd__(secondPol) # Assert self.assertEqual(str(eq), '7x + 7')
def test_radd_deg2_deg2_1polynome(self): # Arrange firstPol = Polynome([-3, -2, -1]) secondPol = Polynome([8, 2, -8]) # Act eq = firstPol.__radd__(secondPol) # Assert self.assertEqual(str(eq), '5x^2 - 9')