X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/161d0ced692386a866e55aea673d991e2e95f753..de11b4e658edf3ea876aaea3d3d681eaec13dcc4:/pypol/tests/test_linexprs.py?ds=inline diff --git a/pypol/tests/test_linexprs.py b/pypol/tests/test_linexprs.py index 508c57b..4c27b21 100644 --- a/pypol/tests/test_linexprs.py +++ b/pypol/tests/test_linexprs.py @@ -225,11 +225,6 @@ class TestSymbol(unittest.TestCase): with self.assertRaises(TypeError): Symbol.fromsympy(sp_x*sp_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]) - self.assertListEqual(list(symbols(['x', 'y'])), [self.x, self.y]) - class TestDummy(unittest.TestCase): @@ -248,6 +243,22 @@ class TestDummy(unittest.TestCase): self.assertNotEqual(Dummy(), Dummy()) +class TestSymbols(unittest.TestCase): + + def setUp(self): + self.x = Symbol('x') + self.y = Symbol('y') + + def test(self): + self.assertListEqual(list(symbols('x y')), [self.x, self.y]) + self.assertListEqual(list(symbols('x,y')), [self.x, self.y]) + self.assertListEqual(list(symbols(['x', 'y'])), [self.x, self.y]) + with self.assertRaises(TypeError): + symbols(1) + with self.assertRaises(TypeError): + symbols(['a', 1]) + + class TestRational(unittest.TestCase): def setUp(self):