diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index a08e90659a8f..2a751f982f4b 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -132,7 +132,7 @@ def testObjects(self): except: FreeCAD.Console.PrintLog(" exception thrown, OK\n") else: - self.fail("no exeption thrown") + self.fail("no exception thrown") #self.failUnless(L1.IntegerList == [4711] ) #f = L1.FloatList @@ -146,6 +146,13 @@ def testObjects(self): self.failUnless(L1.Label== "Label_2","Invalid object name") self.Doc.removeObject("Label_1") + def testEnum(self): + enumeration_choices = ["one", "two"] + obj = self.Doc.addObject("App::FeaturePython","Label_2") + obj.addProperty("App::PropertyEnumeration", "myEnumeration", "Enum", "mytest") + with self.assertRaises(FreeCAD.Base.FreeCADError): + obj.myEnumeration = enumeration_choices[0] + def testMem(self): self.Doc.MemSize