mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-12 16:32:01 -05:00
Silence comparison-with-itself in tests
Test code performs comparison to itself in order to verify __eq__ and __ne__ implementations. See: https://pagure.io/freeipa/issue/7758 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
1 parent
dc2c71bff8
commit
ec61f5de3c
3 files changed
+4
No files matched your search
@@ -214,6 +214,7 @@ class test_Gettext:
|
|||||||
inst3 = self.klass('Hello world', 'foo', 'bar')
|
inst3 = self.klass('Hello world', 'foo', 'bar')
|
||||||
inst4 = self.klass('what up?', 'foo', 'baz')
|
inst4 = self.klass('what up?', 'foo', 'baz')
|
||||||
|
|
||||||
|
# pylint: disable=comparison-with-itself
|
||||||
assert (inst1 == inst1) is True
|
assert (inst1 == inst1) is True
|
||||||
assert (inst1 == inst2) is True
|
assert (inst1 == inst2) is True
|
||||||
assert (inst1 == inst3) is False
|
assert (inst1 == inst3) is False
|
||||||
@@ -292,6 +293,7 @@ class test_NGettext:
|
|||||||
inst3 = self.klass(singular, '%(count)d thingies', 'foo', 'bar')
|
inst3 = self.klass(singular, '%(count)d thingies', 'foo', 'bar')
|
||||||
inst4 = self.klass(singular, plural, 'foo', 'baz')
|
inst4 = self.klass(singular, plural, 'foo', 'baz')
|
||||||
|
|
||||||
|
# pylint: disable=comparison-with-itself
|
||||||
assert (inst1 == inst1) is True
|
assert (inst1 == inst1) is True
|
||||||
assert (inst1 == inst2) is True
|
assert (inst1 == inst2) is True
|
||||||
assert (inst1 == inst3) is False
|
assert (inst1 == inst3) is False
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ def test_ipa_version():
|
|||||||
if hasattr(v4, '_rpmvercmp'):
|
if hasattr(v4, '_rpmvercmp'):
|
||||||
assert v4._rpmvercmp_func is not None
|
assert v4._rpmvercmp_func is not None
|
||||||
|
|
||||||
|
# pylint: disable=comparison-with-itself
|
||||||
assert v3 < v4
|
assert v3 < v4
|
||||||
assert v3 <= v4
|
assert v3 <= v4
|
||||||
assert v3 <= v3
|
assert v3 <= v3
|
||||||
|
|||||||
@@ -913,6 +913,7 @@ class TestDN(unittest.TestCase):
|
|||||||
|
|
||||||
# Test "in" membership
|
# Test "in" membership
|
||||||
self.assertTrue(self.container_rdn1 in container_dn)
|
self.assertTrue(self.container_rdn1 in container_dn)
|
||||||
|
# pylint: disable=comparison-with-itself
|
||||||
self.assertTrue(container_dn in container_dn)
|
self.assertTrue(container_dn in container_dn)
|
||||||
self.assertFalse(self.base_rdn1 in container_dn)
|
self.assertFalse(self.base_rdn1 in container_dn)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user