mailr7339 - in /1.3/test_suite/system_tests: __init__.py structure.py


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

Header


Content

Posted by edward on September 26, 2008 - 15:47:
Author: bugman
Date: Fri Sep 26 15:47:09 2008
New Revision: 7339

URL: http://svn.gna.org/viewcvs/relax?rev=7339&view=rev
Log:
Added a system test to check the loading of a PDB file using the information 
in a results file.


Added:
    1.3/test_suite/system_tests/structure.py
Modified:
    1.3/test_suite/system_tests/__init__.py

Modified: 1.3/test_suite/system_tests/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/__init__.py?rev=7339&r1=7338&r2=7339&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/__init__.py (original)
+++ 1.3/test_suite/system_tests/__init__.py Fri Sep 26 15:47:09 2008
@@ -47,6 +47,7 @@
 from relax_fit import Relax_fit
 from results import Results
 from sequence import Sequence
+from structure import Structure
 from unit_vectors import Unit_vectors
 
 
@@ -66,6 +67,7 @@
            'relax_fit',
            'results',
            'sequence',
+           'structure',
            'unit_vectors']
 
 
@@ -103,6 +105,7 @@
         suite_array.append(TestLoader().loadTestsFromTestCase(Relax_fit))
         suite_array.append(TestLoader().loadTestsFromTestCase(Results))
         suite_array.append(TestLoader().loadTestsFromTestCase(Sequence))
+        suite_array.append(TestLoader().loadTestsFromTestCase(Structure))
         suite_array.append(TestLoader().loadTestsFromTestCase(Unit_vectors))
 
         # Add the relax namespace to each TestCase object.

Added: 1.3/test_suite/system_tests/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/structure.py?rev=7339&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/structure.py (added)
+++ 1.3/test_suite/system_tests/structure.py Fri Sep 26 15:47:09 2008
@@ -1,0 +1,54 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax is free software; you can redistribute it and/or modify              
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation; either version 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax is distributed in the hope that it will be useful,                   
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Python module imports.
+import sys
+from unittest import TestCase
+
+# relax module imports.
+from data import Relax_data_store; ds = Relax_data_store()
+
+
+class Structure(TestCase):
+    """Class for testing the structural objects."""
+
+    def setUp(self):
+        """Set up for all the functional tests."""
+
+        # Create the data pipe.
+        self.relax.interpreter._Pipe.create('mf', 'mf')
+
+
+    def tearDown(self):
+        """Reset the relax data storage object."""
+
+        ds.__reset__()
+
+
+    def test_load_results(self):
+        """Load the PDB file using the information in a results file."""
+
+        # Path of the files.
+        path = sys.path[-1] + '/test_suite/shared_data/results_files'
+
+        # Read the results file.
+        self.relax.interpreter._Results.read(file='str', dir=path)




Related Messages


Powered by MHonArc, Updated Fri Sep 26 16:00:02 2008