mailr3776 - /1.3/test_suite/unit_tests/_prompt/test_sequence.py


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

Header


Content

Posted by edward on November 22, 2007 - 00:00:
Author: bugman
Date: Thu Nov 22 00:00:01 2007
New Revision: 3776

URL: http://svn.gna.org/viewcvs/relax?rev=3776&view=rev
Log:
Added the framework and TestCase class for the unit tests of the 
prompt.sequence module.


Added:
    1.3/test_suite/unit_tests/_prompt/test_sequence.py

Added: 1.3/test_suite/unit_tests/_prompt/test_sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_sequence.py?rev=3776&view=auto
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (added)
+++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Thu Nov 22 00:00:01 
2007
@@ -1,0 +1,55 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2007 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.
+from unittest import TestCase
+import sys
+
+# relax module imports.
+from data import Data as relax_data_store
+from data_types import return_data_types
+from prompt.sequence import Sequence
+from relax_errors import RelaxError
+from test_suite.unit_tests.sequence_testing_base import Sequence_base_class
+
+# Set the variable sys.ps3 (this is required by the user functions).
+sys.ps3 = 'relax> '
+
+
+# A class to act as a container.
+class Container:
+    pass
+
+# Fake normal relax usage of the user function class.
+relax = Container()
+relax.interpreter = Container()
+relax.interpreter.intro = True
+
+
+class Test_sequence(Sequence_base_class, TestCase):
+    """Unit tests for the functions of the 'prompt.sequence' module."""
+
+    # Instantiate the user function class.
+    sequence_fns = Sequence(relax)
+
+
+




Related Messages


Powered by MHonArc, Updated Thu Nov 22 00:20:32 2007