mailr18409 - in /branches/frame_order_testing: ./ test_suite/gui_tests/model_free.py test_suite/gui_tests/state.py


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

Header


Content

Posted by edward on February 04, 2013 - 18:50:
Author: bugman
Date: Mon Feb  4 18:50:12 2013
New Revision: 18409

URL: http://svn.gna.org/viewcvs/relax?rev=18409&view=rev
Log:
Merged revisions 18406-18408 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r18406 | bugman | 2013-02-04 18:29:12 +0100 (Mon, 04 Feb 2013) | 3 lines
  
  Copyright update.
........
  r18407 | bugman | 2013-02-04 18:30:29 +0100 (Mon, 04 Feb 2013) | 3 lines
  
  Docstring expansion for the State.test_bug_20480 GUI test.
........
  r18408 | bugman | 2013-02-04 18:42:27 +0100 (Mon, 04 Feb 2013) | 5 lines
  
  Created the Mf.test_bug_20479 GUI test to catch bug #20479 
(https://gna.org/bugs/?20479).
  
  This bug was reported by Stanislava Panova (https://gna.org/users/stacy).
........

Modified:
    branches/frame_order_testing/   (props changed)
    branches/frame_order_testing/test_suite/gui_tests/model_free.py
    branches/frame_order_testing/test_suite/gui_tests/state.py

Propchange: branches/frame_order_testing/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb  4 18:50:12 2013
@@ -1,1 +1,1 @@
-/trunk:1-18404
+/trunk:1-18408

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=18409&r1=18408&r2=18409&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 Mon Feb  
4 18:50:12 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).         
 #
 #                                                                            
 #
@@ -22,6 +22,7 @@
 # Python module imports.
 import numpy
 from os import F_OK, access, sep
+from tempfile import mkdtemp
 import wx
 
 # relax module imports.
@@ -42,6 +43,52 @@
 
 class Mf(GuiTestCase):
     """Class for testing various aspects specific to the model-free 
auto-analysis."""
+
+    def test_bug_20479(self):
+        """Catch bug #20479 (https://gna.org/bugs/?20479), the failure to 
load a relax state in the GUI.
+
+        This was reported by Stanislava Panova (https://gna.org/users/stacy).
+        """
+
+        # Simulate the 'Open relax state' menu entry.
+        file = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'saved_states' + sep + 'bug_20480.bz2'
+        self.app.gui.state_load(file_name=file)
+
+        # Check that the data has been loaded.
+        self.assertEqual(cdp_name(), "aic - mf (Mon Feb  4 13:30:01 2013)")
+        self.assertEqual(cdp.frq['NOE_800'], 800000031.0)
+        self.assertEqual(cdp.frq['R1_800'], 800000031.0)
+        self.assertEqual(cdp.frq['R2_800'], 800000031.0)
+        self.assertEqual(cdp.frq['R2_600'], 599999000.0)
+
+        # Alias the analysis.
+        analysis = self.app.gui.analysis.get_page_from_name("Model-free")
+
+        # Set the protocol mode to automatic.
+        analysis.mode_win.select_final()
+        analysis.mode_dialog()
+
+        # Change the results directory.
+        ds.tmpdir = mkdtemp()
+        analysis.field_results_dir.SetValue(str_to_gui(ds.tmpdir))
+
+        # Modify some of the class variables to speed up optimisation.
+        auto_model_free.dauvergne_protocol.dAuvergne_protocol.opt_func_tol = 
1e-5
+        
auto_model_free.dauvergne_protocol.dAuvergne_protocol.opt_max_iterations = 
1000
+
+        # Execute relax.
+        state = 
analysis.execute(wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, 
analysis.button_exec_relax.GetId()))
+
+        # Wait for execution to complete.
+        if hasattr(analysis, 'thread'):
+            analysis.thread.join()
+
+        # Flush all wx events.
+        wx.Yield()
+
+        # Exceptions in the thread.
+        self.check_exceptions()
+
 
     def test_mf_auto_analysis(self):
         """Test the model-free auto-analysis."""

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=18409&r1=18408&r2=18409&view=diff
==============================================================================
--- branches/frame_order_testing/test_suite/gui_tests/state.py (original)
+++ branches/frame_order_testing/test_suite/gui_tests/state.py Mon Feb  4 
18:50:12 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).         
 #
 #                                                                            
 #
@@ -39,7 +39,10 @@
     """Class for testing various aspects specific to saved states."""
 
     def test_bug_20480(self):
-        """Catch bug #20480 (https://gna.org/bugs/?20480), the failure to 
load a relax state in the GUI."""
+        """Catch bug #20480 (https://gna.org/bugs/?20480), the failure to 
load a relax state in the GUI.
+
+        This was reported by Stanislava Panova (https://gna.org/users/stacy).
+        """
 
         # Simulate the 'Open relax state' menu entry.
         file = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'saved_states' + sep + 'bug_20480.bz2'




Related Messages


Powered by MHonArc, Updated Mon Feb 04 19:00:02 2013