mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
ParaView-5.0.1: Added the source-tree to ThirdParty-dev and patched as described in the README file
Resolves bug-report http://bugs.openfoam.org/view.php?id=2098
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
import unittest
|
||||
|
||||
from paraview import simple
|
||||
from paraview import servermanager
|
||||
|
||||
|
||||
class TestSimpleModule(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.pxm = servermanager.ProxyManager()
|
||||
|
||||
def test_RenameSource(self):
|
||||
source = simple.Sphere(guiName='oldName')
|
||||
simple.SetActiveSource(source)
|
||||
simple.RenameSource('newName')
|
||||
# changing the source name should unregister the old name
|
||||
self.assertEqual(None, self.pxm.GetProxy('sources', 'oldName'))
|
||||
self.assertEqual(source, self.pxm.GetProxy('sources', 'newName'))
|
||||
# renaming as the current name should not unregister the source
|
||||
simple.RenameSource('newName')
|
||||
self.assertEqual(source, self.pxm.GetProxy('sources', 'newName'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user