Package test_suite :: Package system_tests :: Module pipes
[hide private]
[frames] | no frames]

Source Code for Module test_suite.system_tests.pipes

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2006-2012 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax.                                     # 
 6  #                                                                             # 
 7  # relax is free software; you can redistribute it and/or modify               # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation; either version 2 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # relax is distributed in the hope that it will be useful,                    # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with relax; if not, write to the Free Software                        # 
19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   # 
20  #                                                                             # 
21  ############################################################################### 
22   
23  # Python module imports. 
24  from os import sep 
25   
26  # relax module imports. 
27  from base_classes import SystemTestCase 
28  from data import Relax_data_store; ds = Relax_data_store() 
29  from generic_fns import pipes 
30  from status import Status; status = Status() 
31   
32   
33 -class Pipes(SystemTestCase):
34 """TestCase class for the functional tests of relax data pipes.""" 35
36 - def test_pipe_bundle(self):
37 """Test the pipe bundle concepts.""" 38 39 # Execute the script. 40 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'pipe_bundle.py') 41 42 # Checks. 43 self.assertEqual(pipes.cdp_name(), None) 44 self.assertEqual(pipes.has_bundle('test bundle 1'), True) 45 self.assertEqual(pipes.has_bundle('test bundle 2'), True) 46 self.assertEqual(pipes.has_bundle('test bundle 3'), False) 47 self.assertEqual(pipes.bundle_names(), ['test bundle 1', 'test bundle 2']) 48 for pipe, name in pipes.pipe_loop(name=True): 49 self.assert_(name in ['test pipe 1', 'test pipe 2', 'test pipe 3', 'test pipe 4', 'test pipe 5', 'test pipe 6']) 50 self.assert_(pipes.get_bundle(name) in ['test bundle 1', 'test bundle 2'])
51 52
53 - def test_pipe_create(self):
54 """Create a data pipe.""" 55 56 # Create the data pipe. 57 self.interpreter.pipe.create('test', 'mf')
58