X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/d06ab92943ec2e10a2bd798ca7c1b5cea395bf34..161d0ced692386a866e55aea673d991e2e95f753:/pypol/tests/test_linexprs.py?ds=sidebyside diff --git a/pypol/tests/test_linexprs.py b/pypol/tests/test_linexprs.py index adfec7d..508c57b 100644 --- a/pypol/tests/test_linexprs.py +++ b/pypol/tests/test_linexprs.py @@ -231,6 +231,23 @@ class TestSymbol(unittest.TestCase): self.assertListEqual(list(symbols(['x', 'y'])), [self.x, self.y]) +class TestDummy(unittest.TestCase): + + def setUp(self): + self.x = Dummy('x') + + def test_new(self): + self.assertEqual(self.x.name, 'x') + self.assertTrue(Dummy().name.startswith('Dummy')) + + def test_eq(self): + self.assertEqual(self.x, self.x) + self.assertNotEqual(self.x, Symbol('x')) + self.assertNotEqual(Symbol('x'), self.x) + self.assertNotEqual(self.x, Dummy('x')) + self.assertNotEqual(Dummy(), Dummy()) + + class TestRational(unittest.TestCase): def setUp(self):