mailr23550 - in /branches/disp_speed: ./ specific_analyses/frame_order/uf.py test_suite/gui_tests/test_user_functions.py


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

Header


Content

Posted by tlinnet on May 28, 2014 - 18:09:
Author: tlinnet
Date: Wed May 28 18:09:55 2014
New Revision: 23550

URL: http://svn.gna.org/viewcvs/relax?rev=23550&view=rev
Log:
Merged revisions 23542,23545,23547 via svnmerge from 
svn+ssh://tlinnet@xxxxxxxxxxx/svn/relax/trunk

........
  r23542 | bugman | 2014-05-28 17:47:00 +0200 (Wed, 28 May 2014) | 3 lines
  
  Fixes for the frame order PDB presentation in the frame_order.pdb_model 
user function backend.
........
  r23545 | bugman | 2014-05-28 17:51:34 +0200 (Wed, 28 May 2014) | 3 lines
  
  Fix for a previous commit (r23532).
........
  r23547 | bugman | 2014-05-28 17:56:10 +0200 (Wed, 28 May 2014) | 6 lines
  
  Expanded the User_functions.test_dx_map GUI test once again.
  
  The new test is to set 2 valid points in the wizard, open and close the 
Sequence_2D window (twice),
  and check that the points come back.
........

Modified:
    branches/disp_speed/   (props changed)
    branches/disp_speed/specific_analyses/frame_order/uf.py
    branches/disp_speed/test_suite/gui_tests/test_user_functions.py

Propchange: branches/disp_speed/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 28 18:09:55 2014
@@ -1 +1 @@
-/trunk:1-23532
+/trunk:1-23549

Modified: branches/disp_speed/specific_analyses/frame_order/uf.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/specific_analyses/frame_order/uf.py?rev=23550&r1=23549&r2=23550&view=diff
==============================================================================
--- branches/disp_speed/specific_analyses/frame_order/uf.py     (original)
+++ branches/disp_speed/specific_analyses/frame_order/uf.py     Wed May 28 
18:09:55 2014
@@ -237,7 +237,7 @@
 
         # The axis.
         if cdp.model in ['rotor']:
-            axis = create_rotor_axis_alpha(alpha=cdp.axis_alpha, 
pivot=pivot, point=pivot)
+            axis = create_rotor_axis_alpha(alpha=cdp.axis_alpha, 
pivot=pivot, point=com)
         else:
             axis = create_rotor_axis_spherical(theta=cdp.axis_theta, 
phi=cdp.axis_phi)
         print(("Central axis: %s." % axis))
@@ -256,7 +256,7 @@
             # Fill the structure.
             for i in range(cdp.sim_number):
                 if cdp.model in ['rotor']:
-                    axis_sim[i] = 
create_rotor_axis_alpha(alpha=cdp.axis_alpha_sim[i], pivot=pivot, point=pivot)
+                    axis_sim[i] = 
create_rotor_axis_alpha(alpha=cdp.axis_alpha_sim[i], pivot=pivot, point=com)
                 else:
                     axis_sim[i] = 
create_rotor_axis_spherical(theta=cdp.axis_theta_sim[i], 
phi=cdp.axis_phi_sim[i])
 

Modified: branches/disp_speed/test_suite/gui_tests/test_user_functions.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/test_suite/gui_tests/test_user_functions.py?rev=23550&r1=23549&r2=23550&view=diff
==============================================================================
--- branches/disp_speed/test_suite/gui_tests/test_user_functions.py     
(original)
+++ branches/disp_speed/test_suite/gui_tests/test_user_functions.py     Wed 
May 28 18:09:55 2014
@@ -88,7 +88,7 @@
         self.assertEqual(points, None)
 
         # Set a valid point in the wizard, open and close the Sequence_2D 
window (twice), and check that the point comes back.
-        uf.page.uf_args['point'].SetValue(str_to_gui('[1, 2, -3.]'))
+        uf.page.uf_args['point'].SetValue(str_to_gui('[[1, 2, -3.]]'))
         uf.page.uf_args['point'].selection_win_show()
         uf.page.uf_args['point'].selection_win_data()
         uf.page.uf_args['point'].selection_win_show()
@@ -100,6 +100,24 @@
         self.assertEqual(points[0][0], 1.0)
         self.assertEqual(points[0][1], 2.0)
         self.assertEqual(points[0][2], -3.0)
+
+        # Set 2 valid points in the wizard, open and close the Sequence_2D 
window (twice), and check that the points come back.
+        uf.page.uf_args['point'].SetValue(str_to_gui('[[1, 2, 3], [-2, -3, 
-4]]'))
+        uf.page.uf_args['point'].selection_win_show()
+        uf.page.uf_args['point'].selection_win_data()
+        uf.page.uf_args['point'].selection_win_show()
+        uf.page.uf_args['point'].selection_win_data()
+        points = uf.page.uf_args['point'].GetValue()
+        print("Points:  %s" % points)
+        self.assertEqual(len(points), 2)
+        self.assertEqual(len(points[0]), 3)
+        self.assertEqual(len(points[1]), 3)
+        self.assertEqual(points[0][0], 1.0)
+        self.assertEqual(points[0][1], 2.0)
+        self.assertEqual(points[0][2], 3.0)
+        self.assertEqual(points[1][0], -2.0)
+        self.assertEqual(points[1][1], -3.0)
+        self.assertEqual(points[1][2], -4.0)
 
         # Set the points to a number of invalid values, checking that they 
are ignored.
         for val in ['2', 'die', '[1, 2, 3]', '[1]', '[[1, 2, 3], 1, 2, 3], 
[1, 2, 3]]']:




Related Messages


Powered by MHonArc, Updated Wed May 28 18:20:02 2014