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
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)
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')