X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/9f4798446bbb3ac43f7b8291ddae095af3818299..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):