X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/5c08207a9606e513944a4ba01e6674ee8e13508a..4a5b05e6a8198c51980c14101b06a3e9e0159f4c:/tests/test_linear.py diff --git a/tests/test_linear.py b/tests/test_linear.py index 96b105c..b722726 100644 --- a/tests/test_linear.py +++ b/tests/test_linear.py @@ -82,13 +82,6 @@ class TestExpression(unittest.TestCase): def test_values(self): self.assertCountEqual(self.expr.values(), [1, -2, 3]) - def test_symbol(self): - self.assertEqual(self.x.symbol, 'x') - with self.assertRaises(ValueError): - self.pi.symbol - with self.assertRaises(ValueError): - self.expr.symbol - def test_issymbol(self): self.assertTrue(self.x.issymbol()) self.assertFalse(self.pi.issymbol()) @@ -140,7 +133,6 @@ class TestExpression(unittest.TestCase): self.assertEqual(repr(self.one), 'Constant(1)') self.assertEqual(repr(self.expr), "Expression({'x': 1, 'y': -2}, 3)") - @unittest.expectedFailure def test_fromstring(self): self.assertEqual(Expression.fromstring('x'), self.x) self.assertEqual(Expression.fromstring('-x'), -self.x) @@ -170,6 +162,9 @@ class TestSymbol(unittest.TestCase): self.x = Symbol('x') self.y = Symbol('y') + def test_name(self): + self.assertEqual(self.x.name, 'x') + def test_symbols(self): self.assertListEqual(list(symbols('x y')), [self.x, self.y]) self.assertListEqual(list(symbols('x,y')), [self.x, self.y])