Author: bugman Date: Tue Mar 13 04:43:51 2007 New Revision: 3164 URL: http://svn.gna.org/viewcvs/relax?rev=3164&view=rev Log: The pipe.create() user function now works! The prompt.pipe module now import the 'generic_fns.pipes' module and executes the create() function. The system/functional test for this user function now passes and has been updated with runs renamed to pipes. Added: 1.3/test_suite/system_tests/pipe_create.py - copied, changed from r3156, 1.3/test_suite/system_tests/run_create.py Removed: 1.3/test_suite/system_tests/run_create.py Modified: 1.3/prompt/pipe.py 1.3/test_suite/system_tests/main.py Modified: 1.3/prompt/pipe.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/pipe.py?rev=3164&r1=3163&r2=3164&view=diff ============================================================================== --- 1.3/prompt/pipe.py (original) +++ 1.3/prompt/pipe.py Tue Mar 13 04:43:51 2007 @@ -25,6 +25,7 @@ # relax module imports. import help +from generic_fns import pipes from relax_errors import RelaxListStrError, RelaxNoneListError, RelaxNoneStrError, RelaxStrError @@ -89,7 +90,7 @@ raise RelaxStrError, ('data pipe type', pipe_type) # Execute the functional code. - self.__relax__.generic.pipes.create(pipe_name=pipe_name, pipe_type=pipe_type) + pipes.create(pipe_name=pipe_name, pipe_type=pipe_type) def delete(self, pipe_name=None): Modified: 1.3/test_suite/system_tests/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/main.py?rev=3164&r1=3163&r2=3164&view=diff ============================================================================== --- 1.3/test_suite/system_tests/main.py (original) +++ 1.3/test_suite/system_tests/main.py Tue Mar 13 04:43:51 2007 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006 Edward d'Auvergne # +# Copyright (C) 2006-2007 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -35,7 +35,7 @@ from model_free import Mf from model_selection import Modsel from relax_fit import Relax_fit -from run_create import Run_create +from pipe_create import Pipe_create from sequence import Sequence @@ -59,20 +59,20 @@ heading("The relax test suite") - # Run tests. - ############ - - # Heading. - heading("The run tests") - - # Initialise the array containing each test element. - self.run_test_array = [] - - # User function run.create() test. - self.run_test_array.append(Run_create(self.relax)) - - # Execute the tests. - self.exec_tests(self.run_test_array) + # Data pipe tests. + ################## + + # Heading. + heading("The data pipe tests") + + # Initialise the array containing each test element. + self.pipe_test_array = [] + + # User function pipe.create() test. + self.pipe_test_array.append(Pipe_create(self.relax)) + + # Execute the tests. + self.exec_tests(self.pipe_test_array) # Sequence tests. @@ -283,14 +283,14 @@ global_pass = 1 - # Run tests. - ############ - - # Heading. - sys.stdout.write("\nThe run tests:\n") - - # Loop over the tests. - for test in self.run_test_array: + # Data pipe tests. + ################## + + # Heading. + sys.stdout.write("\nThe data pipe tests:\n") + + # Loop over the tests. + for test in self.pipe_test_array: # Synopsis. global_pass = global_pass and test.passed Copied: 1.3/test_suite/system_tests/pipe_create.py (from r3156, 1.3/test_suite/system_tests/run_create.py) URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/pipe_create.py?p2=1.3/test_suite/system_tests/pipe_create.py&p1=1.3/test_suite/system_tests/run_create.py&r1=3156&r2=3164&rev=3164&view=diff ============================================================================== --- 1.3/test_suite/system_tests/run_create.py (original) +++ 1.3/test_suite/system_tests/pipe_create.py Tue Mar 13 04:43:51 2007 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2006 Edward d'Auvergne # +# Copyright (C) 2006-2007 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -21,21 +21,21 @@ ############################################################################### -class Run_create: +class Pipe_create: def __init__(self, relax): - """Class for testing the creation of runs.""" + """Class for testing the creation of data pipes.""" self.relax = relax # The name of the test. - self.name = "The user function run.create()" + self.name = "The user function pipe.create()" - def test(self, run): + def test(self, pipe): """The actual test.""" - # Create the run. - self.relax.interpreter._Run.create(run, 'mf') + # Create the data pipe. + self.relax.interpreter._Pipe.create(pipe, 'mf') # Success. return 1