Transition from v0.1 XML playlists to v0.2 YAML playlists.
[hooke.git] / test / flat_filter_playlist.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 >>> from hooke.hooke import Hooke, HookeRunner
21 >>> h = Hooke()
22 >>> r = HookeRunner()
23 >>> h = r.run_lines(h, ['load_playlist test/data/vclamp_picoforce/playlist']) # doctest: +ELLIPSIS
24 <FilePlaylist PicoForce>
25 Success
26 <BLANKLINE>
27 >>> h = r.run_lines(h, ['flat_filter_playlist --distance_column "z piezo (m)" --deflection_column "deflection (m)"']) # doctest: +ELLIPSIS
28 <FilePlaylist playlist-0>
29 Success
30 <BLANKLINE>
31 >>> h.playlists.jump(-1)
32 >>> h.playlists.current().name
33 'playlist-0'
34 >>> h.playlists.current().path
35 u'test/data/vclamp_picoforce/playlist-0.hkp'
36 >>> len(h.playlists.current())
37 0
38
39 Note: I just checked and there really are no interesting features in
40 the vclamp_picoforce data.  Sad.
41 """