1 # Copyright (C) 2010-2012 W. Trevor King <wking@tremily.us>
3 # This file is part of Hooke.
5 # Hooke is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation, either version 3 of the License, or (at your option) any
10 # Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with Hooke. If not, see <http://www.gnu.org/licenses/>.
19 >>> from hooke.hooke import Hooke, HookeRunner
23 >>> h = r.run_lines(h, ['new_playlist --output_playlist mylist'])
27 >>> h = r.run_lines(h, ['glob_curves_to_playlist test/data/vclamp_picoforce/*']
28 ... ) # doctest: +ELLIPSIS, +REPORT_UDIFF
32 <Curve 20071120a_i27_t33.100>
33 <Curve 20071120a_i27_t33.101>
35 <Curve 20071120a_i27_t33.199>
38 >>> h = r.run_lines(h, ['jump_to_curve 14'])
41 >>> h = r.run_lines(h, ['''set_note "Hi there.\\nI'm a note"'''])
44 >>> h = r.run_lines(h, ['jump_to_curve 27'])
47 >>> h = r.run_lines(h, ['''set_note "I'm another note."'''])
50 >>> h = r.run_lines(h, ['note_filter_playlist --output_playlist filtered'])
51 <FilePlaylist filtered>
54 >>> h = r.run_lines(h, ['get_playlist'])
58 >>> h = r.run_lines(h, ['jump_to_playlist -- -1'])
61 >>> h = r.run_lines(h, ['get_playlist'])
62 <FilePlaylist filtered>
65 >>> h = r.run_lines(h, ['get_curve'])
66 <Curve 20071120a_i27_t33.112>
69 >>> h = r.run_lines(h, ['curve_index'])
73 >>> h = r.run_lines(h, ['jump_to_curve -- -1'])
76 >>> h = r.run_lines(h, ['get_curve'])
77 <Curve 20071120a_i27_t33.125>
80 >>> h = r.run_lines(h, ['curve_index'])
84 >>> h = r.run_lines(h, ['get_note'])
88 >>> h = r.run_lines(h, ['set_note ""'])
91 >>> h = r.run_lines(h, ['get_note'])