App: fix failure to detect cyclic dependencies on expressions
See also forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=74331
This commit is contained in:
@@ -1632,6 +1632,12 @@ class DocumentExpressionCases(unittest.TestCase):
|
||||
FreeCAD.closeDocument(self.Doc.Name)
|
||||
self.Doc = FreeCAD.openDocument(SaveName)
|
||||
|
||||
def testCyclicDependencyOnPlacement(self):
|
||||
obj = self.Doc.addObject("App::FeaturePython","Python")
|
||||
obj.addProperty("App::PropertyPlacement", "Placement")
|
||||
obj.setExpression('.Placement.Base.x', '.Placement.Base.y + 10mm')
|
||||
with self.assertRaises(RuntimeError):
|
||||
obj.setExpression('.Placement.Base.y', '.Placement.Base.x + 10mm')
|
||||
|
||||
def tearDown(self):
|
||||
#closing doc
|
||||
|
||||
Reference in New Issue
Block a user