From: Douglas Bagnall Date: Tue, 28 May 2024 07:42:04 +0000 (+1200) Subject: talloc:pytest: remove tests that only test Python 2 X-Git-Tag: tdb-1.4.11~516 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fcba46957f5974362a2f32b840eb3f96d0affc2;p=thirdparty%2Fsamba.git talloc:pytest: remove tests that only test Python 2 Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/talloc/test_pytalloc.py b/lib/talloc/test_pytalloc.py index 809510fea8d..655b83f3d31 100644 --- a/lib/talloc/test_pytalloc.py +++ b/lib/talloc/test_pytalloc.py @@ -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):