Merge "Add __ne__ built-in function"
This commit is contained in:
commit
e7ec26dbd9
@ -441,6 +441,9 @@ class Server(object):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def __ne__(self, other):
|
||||||
|
return not self.__eq__(other)
|
||||||
|
|
||||||
def get_pid_file_name(self, conf_file):
|
def get_pid_file_name(self, conf_file):
|
||||||
"""Translate conf_file to a corresponding pid_file
|
"""Translate conf_file to a corresponding pid_file
|
||||||
|
|
||||||
|
@ -2154,13 +2154,6 @@ class TestRingBuilder(unittest.TestCase):
|
|||||||
# now double up a device assignment
|
# now double up a device assignment
|
||||||
rb._replica2part2dev[1][200] = rb._replica2part2dev[2][200]
|
rb._replica2part2dev[1][200] = rb._replica2part2dev[2][200]
|
||||||
|
|
||||||
class SubStringMatcher(object):
|
|
||||||
def __init__(self, substr):
|
|
||||||
self.substr = substr
|
|
||||||
|
|
||||||
def __eq__(self, other):
|
|
||||||
return self.substr in other
|
|
||||||
|
|
||||||
with self.assertRaises(exceptions.RingValidationError) as e:
|
with self.assertRaises(exceptions.RingValidationError) as e:
|
||||||
rb.validate()
|
rb.validate()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user