updates to recursion issues in reciprocal maps

This commit is contained in:
Rowan Cockett
2015-06-01 15:58:26 -07:00
parent 658d481dd6
commit 4fa4ef643d
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -52,6 +52,8 @@ class Property(object):
if mapping is None and prop.propertyLink is not None:
linkName, linkMapClass = prop.propertyLink
linkMap = linkMapClass(None)
if getattr(self, '%sMap'%linkName, None) is None:
return prop.defaultVal
m = getattr(self, '%s'%linkName)
return linkMap * m
+2
View File
@@ -103,6 +103,8 @@ class TestPropMaps(unittest.TestCase):
assert pm.sigmaDeriv is not None
assert pm.rhoDeriv is not None
assert pm.mu == mu_0
assert pm.mui == 1.0/mu_0
assert pm.muMap is None
assert pm.muDeriv is None
assert pm.muiMap is None