Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-10-04 21:36:50 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-10-04 21:36:50 (GMT)
commit2c29c0111ee94d69d038c22294dfdd1549fdbed3 (patch)
tree67ab3f9cf9777212dafacc628e8263100dc3ac20 /tutorius/properties.py
parentc5a4e544e1abf11ffa8378a4a03df92e40137cff (diff)
LP 439980 : Adding tests for the is_identical function in the Core, on the FSM and the State
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index 7bfbad0..2afe119 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -101,13 +101,13 @@ class TPropContainer(object):
the every property of the first one can be found in the other container, with
the same name and the same value.
- This is an approximation of identity because we are really looking to see
- if this container is at least a subset of the other.
-
@param otherContainer The other container that we wish to test for equality.
@returns True if every property in the first container can be found with the same
value and the same name in the second container.
"""
+ # Make sure both have the same number of properties
+ if len(self._props) != len(otherContainer._props):
+ return False
# For every property in this container
for prop in self._props.keys():
found = False
@@ -224,19 +224,6 @@ class TAddonListProperty(TutoriusProperty):
"""
pass
-
- def get_constraints(self):
- """
- Returns the list of constraints associated to this property.
- """
- if self._constraints is None:
- self._constraints = []
- for i in dir(self):
- typ = getattr(self, i)
- if isinstance(typ, Constraint):
- self._constraints.append(i)
- return self._constraints
-
class TIntProperty(TutoriusProperty):
"""
Represents an integer. Can have an upper value limit and/or a lower value