X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/4a4d773df0dea3cea63023b8d01f380a0024e25a..56ab422e3bbc5a6a072f5b2a5be9d88d1017f03f:/tests/test_linear.py diff --git a/tests/test_linear.py b/tests/test_linear.py index 039ffc7..1fe9ac8 100644 --- a/tests/test_linear.py +++ b/tests/test_linear.py @@ -1,4 +1,3 @@ - import unittest from fractions import Fraction @@ -83,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()) @@ -171,6 +163,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])