MCPcopy Create free account
hub / github.com/Kitware/VTK / testConstructorArgs

Method testConstructorArgs

Common/Core/Testing/Python/TestSubClass.py:78–83  ·  view source on GitHub ↗

Test the use of constructor arguments.

(self)

Source from the content-addressed store, hash-verified

76 self.assertEqual(o.GetClassName(), "vtkCustomObject")
77
78 def testConstructorArgs(self):
79 """Test the use of constructor arguments."""
80 extra = vtkObject()
81 o = vtkCustomObject(extra)
82 self.assertEqual(o.GetClassName(), "vtkCustomObject")
83 self.assertEqual(id(o.GetExtraObject()), id(extra))
84
85 def testCallUnboundMethods(self):
86 """Test calling an unbound method in an overridden method"""

Callers

nothing calls this directly

Calls 5

idFunction · 0.85
GetExtraObjectMethod · 0.80
vtkCustomObjectClass · 0.70
vtkObjectClass · 0.50
GetClassNameMethod · 0.45

Tested by

no test coverage detected