1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 from os import sep
24
25
26 from data_store import Relax_data_store; ds = Relax_data_store()
27 import dep_check
28 from pipe_control import pipes
29 from status import Status; status = Status()
30 from test_suite.system_tests.base_classes import SystemTestCase
31
32
33 -class Pipes(SystemTestCase):
34 """TestCase class for the functional tests of relax data pipes."""
35
36 - def __init__(self, methodName='runTest'):
37 """Skip some tests if scipy is not installed.
38
39 @keyword methodName: The name of the test.
40 @type methodName: str
41 """
42
43
44 super(Pipes, self).__init__(methodName)
45
46
47 if not dep_check.scipy_module and methodName in ['test_change_type']:
48
49 status.skipped_tests.append([methodName, 'Scipy', self._skip_type])
50
51
63
64
66 """Test the pipe bundle concepts."""
67
68
69 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'pipe_bundle.py')
70
71
72 self.assertEqual(pipes.cdp_name(), None)
73 self.assertEqual(pipes.has_bundle('test bundle 1'), True)
74 self.assertEqual(pipes.has_bundle('test bundle 2'), True)
75 self.assertEqual(pipes.has_bundle('test bundle 3'), False)
76 bundles = sorted(pipes.bundle_names())
77 self.assertEqual(bundles, ['test bundle 1', 'test bundle 2'])
78 for pipe, name in pipes.pipe_loop(name=True):
79 self.assert_(name in ['test pipe 1', 'test pipe 2', 'test pipe 3', 'test pipe 4', 'test pipe 5', 'test pipe 6'])
80 self.assert_(pipes.get_bundle(name) in ['test bundle 1', 'test bundle 2'])
81
82
88