From: Vivien Maisonneuve Date: Mon, 30 Jun 2014 15:33:38 +0000 (+0200) Subject: Remove explicit calls to magic methods in test files X-Git-Tag: 1.0~185 X-Git-Url: https://scm.cri.mines-paristech.fr/git/linpy.git/commitdiff_plain/7941e9e70af9f90f2fce0fd3ea694fc0b422f583?ds=inline;hp=ea1451506357e9c8de93a6058cecec042eef5b46 Remove explicit calls to magic methods in test files --- diff --git a/pypol/tests/test_domains.py b/pypol/tests/test_domains.py index f0f241f..555c331 100644 --- a/pypol/tests/test_domains.py +++ b/pypol/tests/test_domains.py @@ -51,8 +51,8 @@ class TestDomain(unittest.TestCase): self.assertFalse(self.unbound_poly.isbounded()) def test_eq(self): - self.assertTrue(self.square1.__eq__(self.square1)) - self.assertFalse(self.square1.__eq__(self.square2)) + self.assertTrue(self.square1 == self.square1) + self.assertFalse(self.square1 == self.square2) def test_isdisjoint(self): self.assertFalse(self.square1.isdisjoint(self.square2)) @@ -63,12 +63,12 @@ class TestDomain(unittest.TestCase): self.assertFalse(self.square1.issubset(self.square2)) def test_le(self): - self.assertTrue(self.square4.__le__(self.square3)) - self.assertFalse(self.square3.__le__(self.square4)) + self.assertTrue(self.square4 <= self.square3) + self.assertFalse(self.square3 <= self.square4) def test_lt(self): - self.assertTrue(self.square4.__lt__(self.square3)) - self.assertFalse(self.square3.__lt__(self.square4)) + self.assertTrue(self.square4 < self.square3) + self.assertFalse(self.square3 < self.square4) def test_compliment(self): self.assertEqual(~self.square1, self.compliment) @@ -96,10 +96,10 @@ class TestDomain(unittest.TestCase): self.assertEqual(self.square1.union(self.square2), self.union) def test_or(self): - self.assertEqual(self.square1.__or__(self.square2), self.union) + self.assertEqual(self.square1 | self.square2, self.union) def test_add(self): - self.assertEqual(self.square2.__add__(self.square1), self.sum1) + self.assertEqual(self.square2 + self.square1, self.sum1) self.assertEqual(Polyhedron(self.square1 + self.square2), self.sum2) def test_difference(self):