From 94dceaf09add9779b010b9317fdbd5eab969bc3f Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 3 May 2022 11:46:04 +0200 Subject: [PATCH] Test: [skip ci] add unit tests for Prop_None and Prop_Output --- src/Mod/Test/Document.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 99fca918a1..4acf2e8725 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -363,6 +363,20 @@ class DocumentBasicCases(unittest.TestCase): o2.Placement = FreeCAD.Placement() self.assertEqual(o1.Link, o3) + def testProp_NonePropertyLink(self): + obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") + obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") + obj1.addProperty("App::PropertyLink", "Link", "Base", "Link to another feature", FreeCAD.PropertyType.Prop_None, False, False) + obj1.Link = obj2 + self.assertEqual(obj1.MustExecute, True) + + def testProp_OutputPropertyLink(self): + obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") + obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") + obj1.addProperty("App::PropertyLink", "Link", "Base", "Link to another feature", FreeCAD.PropertyType.Prop_Output, False, False) + obj1.Link = obj2 + self.assertEqual(obj1.MustExecute, False) + def testNotification_Issue2902Part2(self): o = self.Doc.addObject("App::FeatureTest","test")