Updated test/ to match the new explicit YAML format.
[hooke.git] / test / mfp3d_driver.py
1 # Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
2 #
3 # This file is part of Hooke.
4 #
5 # Hooke is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as
7 # published by the Free Software Foundation, either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
13 # Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with Hooke.  If not, see
17 # <http://www.gnu.org/licenses/>.
18
19 """
20 >>> import os.path
21 >>> from hooke.hooke import Hooke, HookeRunner
22 >>> h = Hooke()
23 >>> r = HookeRunner()
24 >>> playlist = os.path.join('test', 'data', 'vclamp_mfp3d', 'playlist')
25 >>> h = r.run_lines(h, ['load_playlist ' + playlist])
26 <FilePlaylist MFP3D>
27 Success
28 <BLANKLINE>
29 >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF
30 name: Line0004Point0000.ibw
31 path: .../test/data/vclamp_mfp3d/Line0004Point0000.ibw
32 experiment: <hooke.experiment.VelocityClamp object at 0x...>
33 driver: <hooke.driver.mfp3d.MFP3DDriver object at 0x...>
34 filetype: mfp3d
35 note: None
36 command stack: []
37 blocks: 3
38 block sizes: [(491, 2), (497, 2), (105, 2)]
39 Success
40 <BLANKLINE>
41
42 Also checkout a newer Image* file.
43
44 >>> h = r.run_lines(h, ['previous_curve'])
45 Success
46 <BLANKLINE>
47 >>> h = r.run_lines(h, ['curve_info']) # doctest: +ELLIPSIS, +REPORT_UDIFF
48 name: Image0396.ibw
49 path: .../test/data/vclamp_mfp3d/Image0396.ibw
50 experiment: <hooke.experiment.VelocityClamp object at 0x...>
51 driver: <hooke.driver.mfp3d.MFP3DDriver object at 0x...>
52 filetype: mfp3d
53 note: None
54 command stack: []
55 blocks: 3
56 block sizes: [(506, 3), (6, 3), (496, 3)]
57 Success
58 <BLANKLINE>
59 """