diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 06b9b41a91..afea2aa3c1 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -965,6 +965,8 @@ class DocumentPlatformCases(unittest.TestCase): def tearDown(self): #closing doc FreeCAD.closeDocument("PlatformTests") + + class DocumentFileIncludeCases(unittest.TestCase): def setUp(self): self.Doc = FreeCAD.newDocument("FileIncludeTests") @@ -1103,6 +1105,17 @@ class DocumentPropertyCases(unittest.TestCase): FreeCAD.closeDocument("PropertyTests") self.Doc = FreeCAD.open(tempFile) + def testRemoveProperty(self): + prop = 'Something' + self.Obj.addProperty('App::PropertyFloat', prop) + self.Obj.Something = 0.01 + self.Doc.recompute() + self.Doc.openTransaction('modify and remove property') + self.Obj.Something = 0.00 + self.Obj.removeProperty(prop) + self.Obj.recompute() + self.Doc.abortTransaction() + def tearDown(self): #closing doc FreeCAD.closeDocument("PropertyTests")