1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

talloc:pytest: remove tests that only test Python 2

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-05-28 19:42:04 +12:00 committed by Douglas Bagnall
parent a0a025d902
commit 0fcba46957

View 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):