mailr3905 - /1.3/test_suite/unit_tests/_prompt/


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

Header


Content

Posted by edward on November 25, 2007 - 15:49:
Author: bugman
Date: Sun Nov 25 15:29:00 2007
New Revision: 3905

URL: http://svn.gna.org/viewcvs/relax?rev=3905&view=rev
Log:
Updated all the prompt module unit tests to use the new 'fake_relax' 
structure.


Modified:
    1.3/test_suite/unit_tests/_prompt/fake_relax.py
    1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py
    1.3/test_suite/unit_tests/_prompt/test_molecule.py
    1.3/test_suite/unit_tests/_prompt/test_residue.py
    1.3/test_suite/unit_tests/_prompt/test_sequence.py
    1.3/test_suite/unit_tests/_prompt/test_spin.py
    1.3/test_suite/unit_tests/_prompt/test_state.py

Modified: 1.3/test_suite/unit_tests/_prompt/fake_relax.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/fake_relax.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/fake_relax.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/fake_relax.py Sun Nov 25 15:29:00 2007
@@ -34,7 +34,7 @@
 
 
 # Fake normal relax usage of the user function class.
-def fake_relax_instance():
+def fake_instance():
     """Function which returns a similar to the relax instance.
 
     This structure is similar enough to the relax instance for the user 
functions to execute.

Modified: 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_diffusion_tensor.py Sun Nov 25 
15:29:00 2007
@@ -22,33 +22,22 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from data import Data as relax_data_store
-from data_types import DATA_TYPES
 from generic_fns import residue
 from prompt.diffusion_tensor import Diffusion_tensor
 from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, 
RelaxNoneStrError, RelaxStrError
 from test_suite.unit_tests.diffusion_tensor_testing_base import 
Diffusion_tensor_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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
 
 class Test_diffusion_tensor(Diffusion_tensor_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.diffusion_tensor' 
module."""
 
     # Instantiate the user function class.
-    diffusion_tensor_fns = Diffusion_tensor(relax)
+    diffusion_tensor_fns = Diffusion_tensor(fake_relax.fake_instance())
     residue_fns = residue

Modified: 1.3/test_suite/unit_tests/_prompt/test_molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_molecule.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_molecule.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_molecule.py Sun Nov 25 15:29:00 
2007
@@ -22,35 +22,24 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from data import Data as relax_data_store
-from data_types import DATA_TYPES
 from generic_fns import residue
 from prompt.molecule import Molecule
 from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, 
RelaxNoneStrError, RelaxStrError
 from test_suite.unit_tests.molecule_testing_base import Molecule_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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
 
 class Test_molecule(Molecule_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.molecule' module."""
 
     # Instantiate the user function class.
-    molecule_fns = Molecule(relax)
+    molecule_fns = Molecule(fake_relax.fake_instance())
     residue_fns = residue
 
 

Modified: 1.3/test_suite/unit_tests/_prompt/test_residue.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_residue.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_residue.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_residue.py Sun Nov 25 15:29:00 2007
@@ -22,34 +22,23 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from data import Data as relax_data_store
-from data_types import DATA_TYPES
 from prompt.residue import Residue
 from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, 
RelaxNoneStrError, RelaxStrError
 from test_suite.unit_tests.residue_testing_base import Residue_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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
 
 class Test_residue(Residue_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.residue' module."""
 
     # Instantiate the user function class.
-    residue_fns = Residue(relax)
+    residue_fns = Residue(fake_relax.fake_instance())
 
 
     def test_copy_argfail_pipe_from(self):

Modified: 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=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_sequence.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_sequence.py Sun Nov 25 15:29:00 
2007
@@ -22,34 +22,23 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from data import Data as relax_data_store
-from data_types import DATA_TYPES
 from prompt.sequence import Sequence
 from relax_errors import RelaxBinError, RelaxNoneIntError, 
RelaxNoneStrError, RelaxStrError
 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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
 
 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)
+    sequence_fns = Sequence(fake_relax.fake_instance())
 
 
     def test_display_argfail_mol_name_col(self):

Modified: 1.3/test_suite/unit_tests/_prompt/test_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_spin.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_spin.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_spin.py Sun Nov 25 15:29:00 2007
@@ -22,34 +22,23 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from data import Data as relax_data_store
-from data_types import DATA_TYPES
 from prompt.spin import Spin
 from relax_errors import RelaxError, RelaxIntError, RelaxNoPipeError, 
RelaxNoneStrError, RelaxStrError
 from test_suite.unit_tests.spin_testing_base import Spin_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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
 
 class Test_spin(Spin_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.spin' module."""
 
     # Instantiate the user function class.
-    spin_fns = Spin(relax)
+    spin_fns = Spin(fake_relax.fake_instance())
 
 
     def test_copy_argfail_pipe_from(self):

Modified: 1.3/test_suite/unit_tests/_prompt/test_state.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_state.py?rev=3905&r1=3904&r2=3905&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/test_state.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/test_state.py Sun Nov 25 15:29:00 2007
@@ -22,34 +22,22 @@
 
 # Python module imports.
 from unittest import TestCase
-import sys
 
 # relax module imports.
 from test_suite.unit_tests.state_testing_base import State_base_class
-from data_types import DATA_TYPES
 from prompt.state import State
 from relax_errors import RelaxBinError, RelaxIntError, RelaxNoneStrError, 
RelaxStrFileError
 
-
-# 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
+# Unit test imports.
+from data_types import DATA_TYPES
+import fake_relax
 
  
 class Test_state(State_base_class, TestCase):
     """Unit tests for the functions of the 'prompt.state' module."""
 
     # Instantiate the user function class.
-    state = State(relax)
+    state = State(fake_relax.fake_instance())
 
     # Rename the user functions.
     state.load_state = state.load




Related Messages


Powered by MHonArc, Updated Sun Nov 25 16:00:26 2007