test file
[linpy.git] / tests / test_linear.py
index 3912fd3..93fc838 100644 (file)
@@ -12,7 +12,7 @@ class TestExpression(unittest.TestCase):
         self.x = symbol('x')
         self.y = symbol('y')
         self.z = symbol('z')
         self.x = symbol('x')
         self.y = symbol('y')
         self.z = symbol('z')
-        self.zero = constant(0)
+        self.zero = constant(5)
         self.pi = constant(Fraction(22, 7))
         self.e = self.x - 2*self.y + 3
 
         self.pi = constant(Fraction(22, 7))
         self.e = self.x - 2*self.y + 3
 
@@ -23,6 +23,7 @@ class TestExpression(unittest.TestCase):
         self.assertCountEqual(self.x.symbols(), ['x'])
         self.assertCountEqual(self.pi.symbols(), [])
         self.assertCountEqual(self.e.symbols(), ['x', 'y'])
         self.assertCountEqual(self.x.symbols(), ['x'])
         self.assertCountEqual(self.pi.symbols(), [])
         self.assertCountEqual(self.e.symbols(), ['x', 'y'])
+        
 
     def test_dimension(self):
         self.assertEqual(self.x.dimension, 1)
 
     def test_dimension(self):
         self.assertEqual(self.x.dimension, 1)
@@ -110,6 +111,7 @@ class TestExpression(unittest.TestCase):
         self.assertEqual(self.e / 2, self.x / 2 - self.y + Fraction(3, 2))
 
     def test_str(self):
         self.assertEqual(self.e / 2, self.x / 2 - self.y + Fraction(3, 2))
 
     def test_str(self):
+        self.assertEqual(str(Expression()), '0')
         self.assertEqual(str(self.x), 'x')
         self.assertEqual(str(-self.x), '-x')
         self.assertEqual(str(self.pi), '22/7')
         self.assertEqual(str(self.x), 'x')
         self.assertEqual(str(-self.x), '-x')
         self.assertEqual(str(self.pi), '22/7')
@@ -174,3 +176,4 @@ class TestPolyhedron(unittest.TestCase):
 
     pass
 
 
     pass
 
+