Commit 2a6ac7f8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

simulation: Do not perform migration for Handle MultiPropertyEquivalenceTester (quantity).

Followup of: "simulation: improve equivalence testers explanations messages".
parent ebdde7ef
...@@ -226,8 +226,9 @@ class EquivalenceTesterMixin: ...@@ -226,8 +226,9 @@ class EquivalenceTesterMixin:
have on this equivalence tester. have on this equivalence tester.
""" """
tested_property = getattr(self, 'tested_property', None) tested_property = getattr(self, 'tested_property', None)
if tested_property != None:
if isinstance(tested_property, tuple): if (getattr(self, '_baseGetTestedPropertyList', None) is None and
isinstance(tested_property, tuple)):
if len(tested_property) == 1: if len(tested_property) == 1:
new_value = tested_property[0] new_value = tested_property[0]
else: else:
...@@ -242,12 +243,15 @@ class EquivalenceTesterMixin: ...@@ -242,12 +243,15 @@ class EquivalenceTesterMixin:
return self._baseGetTestedProperty() return self._baseGetTestedProperty()
def getTestedPropertyList(self): def getTestedPropertyList(self):
if getattr(self, '_baseGetTestedPropertyList', None) is None:
return [self.getTestedProperty()] return [self.getTestedProperty()]
return self._baseGetTestedPropertyList()
def getTestedPropertyTitle(self): def getTestedPropertyTitle(self):
tested_property_title = getattr(self, 'tested_property_title', None) tested_property_title = getattr(self, 'tested_property_title', None)
if tested_property_title != None: if (getattr(self, '_baseGetTestedPropertyTitleList', None) is None and
if isinstance(tested_property_title, tuple): isinstance(tested_property_title, tuple)):
if len(tested_property_title) == 1: if len(tested_property_title) == 1:
new_value = tested_property_title[0] new_value = tested_property_title[0]
else: else:
...@@ -262,4 +266,7 @@ class EquivalenceTesterMixin: ...@@ -262,4 +266,7 @@ class EquivalenceTesterMixin:
return self._baseGetTestedPropertyTitle() return self._baseGetTestedPropertyTitle()
def getTestedPropertyTitleList(self): def getTestedPropertyTitleList(self):
if getattr(self, '_baseGetTestedPropertyTitleList', None) is None:
return [self.getTestedPropertyTitle()] return [self.getTestedPropertyTitle()]
return self._baseGetTestedPropertyTitleList()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment