Author: bugman Date: Wed Feb 6 11:53:23 2013 New Revision: 18429 URL: http://svn.gna.org/viewcvs/relax?rev=18429&view=rev Log: Merged revisions 18425-18428 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r18425 | bugman | 2013-02-05 12:35:30 +0100 (Tue, 05 Feb 2013) | 6 lines Added skips for some GUI tests when wxPython version '2.9.4.1 gtk2 (classic)' is used. There are a number of bugs in this version which cannot be worked around in certain GUI tests, so they must be skipped. ........ r18426 | bugman | 2013-02-05 12:56:36 +0100 (Tue, 05 Feb 2013) | 7 lines More wxPython version '2.9.4.1 gtk2 (classic)' bug avoidances in the GUI tests. Now the auto-analyses do not check the gauges in the relax controller at the end of the auto NOE, Rx, and model-free analyses, as reading gauge values is faulty in this version. The Rx test is no longer skipped for this wxPython version. ........ r18427 | bugman | 2013-02-06 11:44:16 +0100 (Wed, 06 Feb 2013) | 6 lines Improved the printout from the align_tensor.matrix_angles user function. The relax_io.write_data() function is being used and the tensors are now identified by name rather than index. ........ r18428 | bugman | 2013-02-06 11:50:56 +0100 (Wed, 06 Feb 2013) | 3 lines Improved the printouts from the align_tensor.svd user function. ........ Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/generic_fns/align_tensor.py branches/frame_order_testing/test_suite/gui_tests/model_free.py branches/frame_order_testing/test_suite/gui_tests/noe.py branches/frame_order_testing/test_suite/gui_tests/rx.py branches/frame_order_testing/test_suite/gui_tests/state.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Feb 6 11:53:23 2013 @@ -1,1 +1,1 @@ -/trunk:1-18423 +/trunk:1-18428 Modified: branches/frame_order_testing/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/align_tensor.py?rev=18429&r1=18428&r2=18429&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/align_tensor.py (original) +++ branches/frame_order_testing/generic_fns/align_tensor.py Wed Feb 6 11:53:23 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2012 Edward d'Auvergne # +# Copyright (C) 2003-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -37,6 +37,7 @@ from generic_fns import pipes from physical_constants import g1H, h_bar, kB, mu0, return_gyromagnetic_ratio from relax_errors import RelaxError, RelaxNoTensorError, RelaxStrError, RelaxTensorError, RelaxUnknownParamCombError, RelaxUnknownParamError +from relax_io import write_data from relax_warnings import RelaxWarning @@ -1149,17 +1150,21 @@ elif basis_set == 1: sys.stdout.write("{Szz, Sxx-yy, Sxy, Sxz, Syz}") sys.stdout.write(":\n") - sys.stdout.write("%8s" % '') + + # Initialise the table of data. + table = [] + + # The table header. + table.append(['']) for i in range(tensor_num): - sys.stdout.write("%8i" % i) - sys.stdout.write("\n") - - # First loop. + table[0].append(cdp.align_tensors[i].name) + + # First loop over the rows. for i in range(tensor_num): - # Print out. - sys.stdout.write("%8i" % i) - - # Second loop. + # Add the tensor name. + table.append([cdp.align_tensors[i].name]) + + # Second loop over the columns. for j in range(tensor_num): # Dot product. delta = dot(matrix[i], matrix[j]) @@ -1171,11 +1176,11 @@ # The angle (in rad). cdp.align_tensors.angles[i, j] = arccos(delta) - # Print out the angles in degrees. - sys.stdout.write("%8.1f" % (cdp.align_tensors.angles[i, j]*180.0/pi)) - - # Print out. - sys.stdout.write("\n") + # Add to the table as degrees. + table[i+1].append("%8.1f" % (cdp.align_tensors.angles[i, j]*180.0/pi)) + + # Write out the table. + write_data(out=sys.stdout, data=table) def num_tensors(skip_fixed=True): @@ -2066,5 +2071,5 @@ print("\nData pipe: " + repr(pipes.cdp_name())) print("\nSingular values:") for val in s: - print("\t" + repr(val)) - print("\nCondition number: " + repr(cdp.align_tensors.cond_num)) + print(" %.4e" % val) + print("\nCondition number: %.2f" % cdp.align_tensors.cond_num) Modified: branches/frame_order_testing/test_suite/gui_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/gui_tests/model_free.py?rev=18429&r1=18428&r2=18429&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/gui_tests/model_free.py (original) +++ branches/frame_order_testing/test_suite/gui_tests/model_free.py Wed Feb 6 11:53:23 2013 @@ -342,7 +342,8 @@ self.check_exceptions() # Check the relax controller. - if status.relax_mode != 'gui': + # FIXME: skipping the checks for certain wxPython bugs. + if status.relax_mode != 'gui' and wx.version() != '2.9.4.1 gtk2 (classic)': self.assertEqual(self.app.gui.controller.mc_gauge_mf.GetValue(), 100) self.assertEqual(self.app.gui.controller.progress_gauge_mf.GetValue(), 100) self.assertEqual(self.app.gui.controller.main_gauge.GetValue(), 100) Modified: branches/frame_order_testing/test_suite/gui_tests/noe.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/gui_tests/noe.py?rev=18429&r1=18428&r2=18429&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/gui_tests/noe.py (original) +++ branches/frame_order_testing/test_suite/gui_tests/noe.py Wed Feb 6 11:53:23 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006-2012 Edward d'Auvergne # +# Copyright (C) 2006-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -150,7 +150,8 @@ self.check_exceptions() # Check the relax controller. - if status.relax_mode != 'gui': + # FIXME: skipping the checks for certain wxPython bugs. + if status.relax_mode != 'gui' and wx.version() != '2.9.4.1 gtk2 (classic)': self.assertEqual(self.app.gui.controller.main_gauge.GetValue(), 100) # The real data. Modified: branches/frame_order_testing/test_suite/gui_tests/rx.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/gui_tests/rx.py?rev=18429&r1=18428&r2=18429&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/gui_tests/rx.py (original) +++ branches/frame_order_testing/test_suite/gui_tests/rx.py Wed Feb 6 11:53:23 2013 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006-2012 Edward d'Auvergne # +# Copyright (C) 2006-2013 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -41,7 +41,7 @@ """Class for testing various aspects specific to the R1 and R2 analyses.""" def __init__(self, methodName='runTest'): - """Skip the tests if the C modules are non-functional. + """Skip the tests if the C modules are non-functional or for wxPython bugs. @keyword methodName: The name of the test. @type methodName: str @@ -229,7 +229,8 @@ self.check_exceptions() # Check the relax controller. - if status.relax_mode != 'gui': + # FIXME: skipping the checks for certain wxPython bugs. + if status.relax_mode != 'gui' and wx.version() != '2.9.4.1 gtk2 (classic)': self.assertEqual(self.app.gui.controller.mc_gauge_rx.GetValue(), 100) self.assertEqual(self.app.gui.controller.main_gauge.GetValue(), 100) Modified: branches/frame_order_testing/test_suite/gui_tests/state.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/test_suite/gui_tests/state.py?rev=18429&r1=18428&r2=18429&view=diff ============================================================================== --- branches/frame_order_testing/test_suite/gui_tests/state.py (original) +++ branches/frame_order_testing/test_suite/gui_tests/state.py Wed Feb 6 11:53:23 2013 @@ -37,6 +37,23 @@ class State(GuiTestCase): """Class for testing various aspects specific to saved states.""" + + def __init__(self, methodName='runTest'): + """Skip certain tests due to wxPython bugs. + + @keyword methodName: The name of the test. + @type methodName: str + """ + + # Execute the base class method. + super(State, self).__init__(methodName) + + # Skip tests for wxPython 2.9.4.1 bugs. + skip = ['test_load_state_no_gui'] + if wx.version() == '2.9.4.1 gtk2 (classic)' and methodName in skip: + # Store in the status object. + status.skipped_tests.append([methodName, 'wxPython 2.9.4.1 gtk2 bugs', self._skip_type]) + def test_bug_20480(self): """Catch bug #20480 (https://gna.org/bugs/?20480), the failure to load a relax state in the GUI.