From 27f24c069ded03b3a98a5b58e51f100bded71e28 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 20 Nov 2019 08:54:15 +0800 Subject: [PATCH] Test: fix test case Adding dynamic property with an invalid name or existing name is now an error, because there is no easy way for Python code to find out the name of a property if it is auto renamed. --- src/Mod/Path/PathTests/TestPathStock.py | 1 - src/Mod/Test/Document.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/Path/PathTests/TestPathStock.py b/src/Mod/Path/PathTests/TestPathStock.py index 8f9d22e412..af2471d611 100644 --- a/src/Mod/Path/PathTests/TestPathStock.py +++ b/src/Mod/Path/PathTests/TestPathStock.py @@ -45,7 +45,6 @@ class TestPathStock(PathTestBase): model = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "Model") model.addObject(self.base) self.job.Model = model - self.job.addProperty('App::PropertyLink', 'Proxy') self.job.Proxy = FakeJobProxy() def tearDown(self): diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index fd5eb15af4..663b1a662e 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -1325,7 +1325,7 @@ class DocumentPropertyCases(unittest.TestCase): # testing the up and downstream stuff props=self.Obj.supportedProperties() for i in props: - self.Obj.addProperty(i,i) + self.Obj.addProperty(i,i.replace(':','_')) tempPath = tempfile.gettempdir() tempFile = tempPath + os.sep + "PropertyTests.FCStd" self.Doc.saveAs(tempFile)