Author: bugman Date: Thu May 24 18:07:51 2012 New Revision: 16450 URL: http://svn.gna.org/viewcvs/relax?rev=16450&view=rev Log: The jw_mapping system tests are now run as GUI tests. Added: branches/uf_redesign/test_suite/gui_tests/jw_mapping.py - copied, changed from r16448, branches/uf_redesign/test_suite/gui_tests/bmrb.py Modified: branches/uf_redesign/test_suite/gui_tests/__init__.py branches/uf_redesign/test_suite/system_tests/jw_mapping.py branches/uf_redesign/test_suite/system_tests/scripts/jw_mapping.py Modified: branches/uf_redesign/test_suite/gui_tests/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/test_suite/gui_tests/__init__.py?rev=16450&r1=16449&r2=16450&view=diff ============================================================================== --- branches/uf_redesign/test_suite/gui_tests/__init__.py (original) +++ branches/uf_redesign/test_suite/gui_tests/__init__.py Thu May 24 18:07:51 2012 @@ -33,6 +33,7 @@ # relax GUI test module imports. from bmrb import Bmrb +from jw_mapping import Jw_mapping from model_free import Mf from n_state_model import N_state_model from noe import Noe @@ -42,6 +43,7 @@ __all__ = ['bmrb', + 'jw_mapping', 'model_free', 'n_state_model', 'noe', @@ -102,6 +104,7 @@ # All tests. if not tests: suite_array.append(TestLoader().loadTestsFromTestCase(Bmrb)) + suite_array.append(TestLoader().loadTestsFromTestCase(Jw_mapping)) suite_array.append(TestLoader().loadTestsFromTestCase(Mf)) suite_array.append(TestLoader().loadTestsFromTestCase(N_state_model)) suite_array.append(TestLoader().loadTestsFromTestCase(Noe)) Copied: branches/uf_redesign/test_suite/gui_tests/jw_mapping.py (from r16448, branches/uf_redesign/test_suite/gui_tests/bmrb.py) URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/test_suite/gui_tests/jw_mapping.py?p2=branches/uf_redesign/test_suite/gui_tests/jw_mapping.py&p1=branches/uf_redesign/test_suite/gui_tests/bmrb.py&r1=16448&r2=16450&rev=16450&view=diff ============================================================================== --- branches/uf_redesign/test_suite/gui_tests/bmrb.py (original) +++ branches/uf_redesign/test_suite/gui_tests/jw_mapping.py Thu May 24 18:07:51 2012 @@ -21,7 +21,7 @@ ############################################################################### # Module docstring. -"""GUI tests for the BMRB related activities.""" +"""GUI tests for the J(w) mapping related activities.""" # relax module imports. import dep_check @@ -29,11 +29,19 @@ from test_suite import system_tests -class Bmrb(GuiTestCase, system_tests.bmrb.Bmrb): - """Class for testing the BMRB related functions in the GUI.""" +class Jw_mapping(GuiTestCase, system_tests.jw_mapping.Jw): + """Class for testing the J(w) mapping related functions in the GUI.""" def __init__(self, methodName=None): """Set up the test case class for the system tests.""" - # Force execution of the GuiTestCase __init__ method. - GuiTestCase.__init__(self, methodName) + # Execute the base __init__ methods. + super(Jw_mapping, self).__init__(methodName) + + + def setUp(self): + """Set up the tests by executing all base class setUp() methods.""" + + # Call the base class methods. + GuiTestCase.setUp(self) + system_tests.jw_mapping.Jw.setUp(self) Modified: branches/uf_redesign/test_suite/system_tests/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/test_suite/system_tests/jw_mapping.py?rev=16450&r1=16449&r2=16450&view=diff ============================================================================== --- branches/uf_redesign/test_suite/system_tests/jw_mapping.py (original) +++ branches/uf_redesign/test_suite/system_tests/jw_mapping.py Thu May 24 18:07:51 2012 @@ -40,6 +40,7 @@ """Set up for all the functional tests.""" # Create the data pipe. + print "hello" self.interpreter.pipe.create('jw', 'jw') Modified: branches/uf_redesign/test_suite/system_tests/scripts/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/test_suite/system_tests/scripts/jw_mapping.py?rev=16450&r1=16449&r2=16450&view=diff ============================================================================== --- branches/uf_redesign/test_suite/system_tests/scripts/jw_mapping.py (original) +++ branches/uf_redesign/test_suite/system_tests/scripts/jw_mapping.py Thu May 24 18:07:51 2012 @@ -10,46 +10,46 @@ # Create the run. name = 'jw_mapping' -pipe.create(name, 'jw') +self._execute_uf(uf_name='pipe.create', pipe_name=name, pipe_type='jw') # Load the sequence. -sequence.read(status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'noe.dat', res_num_col=1, res_name_col=2) +self._execute_uf(uf_name='sequence.read', file=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'noe.dat', res_num_col=1, res_name_col=2) # Load the relaxation data. -relax_data.read(ri_id='R1_600', ri_type='R1', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'R1.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) -relax_data.read(ri_id='R2_600', ri_type='R2', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'R2.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) -relax_data.read(ri_id='NOE_600', ri_type='NOE', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'noe.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) +self._execute_uf(uf_name='relax_data.read', ri_id='R1_600', ri_type='R1', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'R1.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) +self._execute_uf(uf_name='relax_data.read', ri_id='R2_600', ri_type='R2', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'R2.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) +self._execute_uf(uf_name='relax_data.read', ri_id='NOE_600', ri_type='NOE', frq=600.0*1e6, file=status.install_path+sep+'test_suite'+sep+'shared_data'+sep+'jw_mapping'+sep+'noe.dat', res_num_col=1, res_name_col=2, data_col=3, error_col=4) # Set the nuclei types -value.set('15N', 'heteronuc_type') -value.set('1H', 'proton_type') +self._execute_uf(uf_name='value.set', val='15N', param='heteronuc_type') +self._execute_uf(uf_name='value.set', val='1H', param='proton_type') # Set the bond length and CSA values. -value.set(1.02 * 1e-10, 'r') -value.set(-172 * 1e-6, 'csa') +self._execute_uf(uf_name='value.set', val=1.02 * 1e-10, param='r') +self._execute_uf(uf_name='value.set', val=-172 * 1e-6, param='csa') # Set the frequency. -jw_mapping.set_frq(frq=600.0 * 1e6) +self._execute_uf(uf_name='jw_mapping.set_frq', frq=600.0 * 1e6) # Jw mapping. -calc() +self._execute_uf(uf_name='calc') # Monte Carlo simulations. -monte_carlo.setup(number=500) -monte_carlo.create_data() -calc() -monte_carlo.error_analysis() +self._execute_uf(uf_name='monte_carlo.setup', number=500) +self._execute_uf(uf_name='monte_carlo.create_data') +self._execute_uf(uf_name='calc') +self._execute_uf(uf_name='monte_carlo.error_analysis') # Create grace files. -grace.write(y_data_type='j0', file='devnull', force=True) -grace.write(y_data_type='jwx', file='devnull', force=True) -grace.write(y_data_type='jwh', file='devnull', force=True) +self._execute_uf(uf_name='grace.write', y_data_type='j0', file='devnull', force=True) +self._execute_uf(uf_name='grace.write', y_data_type='jwx', file='devnull', force=True) +self._execute_uf(uf_name='grace.write', y_data_type='jwh', file='devnull', force=True) # Value writing. -value.write(param='j0', file='devnull', force=True) -value.write(param='jwx', file='devnull', force=True) -value.write(param='jwh', file='devnull', force=True) +self._execute_uf(uf_name='value.write', param='j0', file='devnull', force=True) +self._execute_uf(uf_name='value.write', param='jwx', file='devnull', force=True) +self._execute_uf(uf_name='value.write', param='jwh', file='devnull', force=True) # Finish. -results.write(file='devnull', force=True) -state.save('devnull', force=True) +self._execute_uf(uf_name='results.write', file='devnull', force=True) +self._execute_uf(uf_name='state.save', state='devnull', force=True)