mailr27820 - /trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 17, 2015 - 12:21:
Author: bugman
Date: Tue Mar 17 12:21:57 2015
New Revision: 27820

URL: http://svn.gna.org/viewcvs/relax?rev=27820&view=rev
Log:
Created a GUI memory management debugging script for the align_tensor.init 
user function.

This repetitively calls the reset, pipe.create and align_tensor.init user 
functions, and opening the
GUI element for setting alignment tensor elements (the Sequence window).  The 
pympler muppy_log file
shows no memory leaks for these user functions on Linux systems.


Added:
    trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py
      - copied, changed from r27818, 
trunk/devel_scripts/memory_management/GUI_uf_time.py

Copied: trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py 
(from r27818, trunk/devel_scripts/memory_management/GUI_uf_time.py)
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py?p2=trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py&p1=trunk/devel_scripts/memory_management/GUI_uf_time.py&r1=27818&r2=27820&rev=27820&view=diff
==============================================================================
--- trunk/devel_scripts/memory_management/GUI_uf_time.py        (original)
+++ trunk/devel_scripts/memory_management/GUI_uf_align_tensor_init.py   Tue 
Mar 17 12:21:57 2015
@@ -24,6 +24,11 @@
 # Python module imports.
 import wx
 
+# relax module imports.
+from gui.string_conv import float_to_gui, str_to_gui
+from gui.uf_objects import Uf_storage; uf_store = Uf_storage()
+
+
 # Base module imports.
 from GUI_base import Testing_frame
 
@@ -34,10 +39,37 @@
     def test(self):
         """Run the test."""
 
-        # Repetitive calling of the time user function.
+        # Get the App.
+        app = wx.GetApp()
+
+        # Repetitive calling of the align_tensor.init user function.
         for i in self.muppy_loop():
-            self._execute_uf(uf_name='time')
+            # First reset relax.
+            self._execute_uf(uf_name='reset')
 
+            # Set up a data pipe.
+            self._execute_uf(uf_name='pipe.create', pipe_name='GUI uf test', 
pipe_type='N-state')
+
+            # Open the align_tensor.init user function window.
+            uf = uf_store['align_tensor.init']
+            uf._sync = True
+            uf.create_wizard(parent=app.gui)
+
+            # Set the parameters.
+            uf.page.uf_args['params'].SetValue(str_to_gui('(0.00000, 
-0.00017, 0.00016, 0.00060, -0.00019)'))
+            uf.page.uf_args['params'].selection_win_show()
+            
uf.page.uf_args['params'].sel_win.sequence.SetStringItem(index=0, col=1, 
label=float_to_gui(0.00037))
+            uf.page.uf_args['params'].selection_win_data()
+
+            # Set up the other tensor data.
+            uf.page.uf_args['tensor'].SetValue(str_to_gui('Dy'))
+            uf.page.uf_args['align_id'].SetValue(str_to_gui('Dy'))
+
+            # Execute.
+            uf.wizard._go_next(None)
+
+            # Destroy the user function object.
+            uf.Destroy()
 
 
 # Set up and execute the GUI.




Related Messages


Powered by MHonArc, Updated Fri Mar 27 14:40:02 2015