]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
test: incorrect test relying on type comparison
authorArthur Gautier <baloo@gandi.net>
Wed, 30 Mar 2016 23:09:45 +0000 (23:09 +0000)
committerArthur Gautier <baloo@gandi.net>
Thu, 21 Apr 2016 15:33:05 +0000 (15:33 +0000)
This test relies on python2 type comparison mechanism.

A simplier test case is:
``` python
In [1]: class X(object):
    def __gt__(self, other):
        return NotImplemented
   ...:

In [2]: a=X()

In [3]: a>1
Out[3]: True

In [4]: a<1
Out[4]: False
```

Works on python2, not on python3.
Therefore, I'm dropping the testcase

See http://eli.thegreenplace.net/2016/comparing-types-in-python-3/ for
more information about that

Signed-off-by: Arthur Gautier <baloo@gandi.net>
tests/test_name.py

index 4935564da5d05948f3d08814b150c66ea940428c..f8e3d23af502ac53dfa1e2afbeb61ff0b775be63 100644 (file)
@@ -158,9 +158,6 @@ class NameTestCase(unittest.TestCase):
     def testCompare4(self):
         self.failUnless(dns.name.root != 1)
 
-    def testCompare5(self):
-        self.failUnless(dns.name.root < 1 or dns.name.root > 1)
-
     def testSubdomain1(self):
         self.failUnless(not dns.name.empty.is_subdomain(dns.name.root))