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

Method testPriorityArg

Common/Core/Testing/Python/TestCommand.py:65–73  ·  view source on GitHub ↗

Test the optional priority argument

(self)

Source from the content-addressed store, hash-verified

63 self.assertEqual(cb.event, "ModifiedEvent")
64
65 def testPriorityArg(self):
66 """Test the optional priority argument
67 """
68 cb = callback()
69 o = vtkObject()
70 o.AddObserver(vtkCommand.ModifiedEvent, cb, 0.5)
71 o.Modified()
72
73 self.assertEqual(cb.caller, o)
74
75 def testRemoveCommand(self):
76 """Test the removal of an observer.

Callers

nothing calls this directly

Calls 4

callbackClass · 0.70
vtkObjectClass · 0.50
AddObserverMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected