]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
talloc:pytest: remove tests that only test Python 2
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 28 May 2024 07:42:04 +0000 (19:42 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 31 May 2024 00:25:33 +0000 (00:25 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/talloc/test_pytalloc.py

index 809510fea8dc119fb9f1b3630c51b0f367f7b4c5..655b83f3d3147e3fbfc36bc150bb847bb1998da3 100644 (file)
@@ -91,24 +91,6 @@ class TallocComparisonTests(unittest.TestCase):
         self.assertFalse(obj1 >= obj2)
         self.assertFalse(obj1 > obj2)
 
-    def test_compare_different_types(self):
-        # object comparison falls back to comparing types
-        if sys.version_info >= (3, 0):
-            # In Python 3, types are unorderable -- nothing to test
-            return
-        if talloc.Object < _test_pytalloc.DObject:
-            obj1 = _test_pytalloc.new()
-            obj2 = _test_pytalloc.DObject(dummy_func)
-        else:
-            obj2 = _test_pytalloc.new()
-            obj1 = _test_pytalloc.DObject(dummy_func)
-        self.assertFalse(obj1 == obj2)
-        self.assertTrue(obj1 != obj2)
-        self.assertTrue(obj1 <= obj2)
-        self.assertTrue(obj1 < obj2)
-        self.assertFalse(obj1 >= obj2)
-        self.assertFalse(obj1 > obj2)
-
 
 class TallocBaseComparisonTests(unittest.TestCase):
 
@@ -133,24 +115,6 @@ class TallocBaseComparisonTests(unittest.TestCase):
         self.assertFalse(obj1 >= obj2)
         self.assertFalse(obj1 > obj2)
 
-    def test_compare_different_types(self):
-        # object comparison falls back to comparing types
-        if sys.version_info >= (3, 0):
-            # In Python 3, types are unorderable -- nothing to test
-            return
-        if talloc.BaseObject < _test_pytalloc.DBaseObject:
-            obj1 = _test_pytalloc.base_new()
-            obj2 = _test_pytalloc.DBaseObject(dummy_func)
-        else:
-            obj2 = _test_pytalloc.base_new()
-            obj1 = _test_pytalloc.DBaseObject(dummy_func)
-        self.assertFalse(obj1 == obj2)
-        self.assertTrue(obj1 != obj2)
-        self.assertTrue(obj1 <= obj2)
-        self.assertTrue(obj1 < obj2)
-        self.assertFalse(obj1 >= obj2)
-        self.assertFalse(obj1 > obj2)
-
 
 class TallocUtilTests(unittest.TestCase):