Ejemplo n.º 1
0
 def test_multiplication(self):
     e = Equation()
     e.create_multiplication(-1, Element(2))
     self.assertEqual(str(e), '1/2 * 2')
     e = Equation()
     e.create_multiplication(-1, Element(-2))
     self.assertEqual(str(e), '(-1/2) * (-2)')
     e = Equation(1)
     e.create_multiplication(-1, Element(3, 2))
     self.assertEqual(str(e), '2/3 * 1 1/2')
     e = Equation(1)
     e.create_multiplication(-1, Element('-3/2'))
     self.assertEqual(str(e), '(-2/3) * (-1 1/2)')