1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2010-2011 W. Trevor King <wking@drexel.edu>
5 # This file is part of Hooke.
7 # Hooke is free software: you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
12 # Hooke is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15 # Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with Hooke. If not, see
19 # <http://www.gnu.org/licenses/>.
22 >>> from hooke.hooke import Hooke, HookeRunner
25 >>> h = r.run_lines(h, ['help flat_filter_playlist']) # doctest: +REPORT_UDIFF +ELLIPSIS
26 Usage: flat_filter_playlist...
27 F. Musiani, M. Brucale, L. Bubacco, B. Samorì.
28 "Conformational equilibria in monomeric α-Synuclein at the
34 sys.setdefaultencoding('utf-8')
35 import hooke.util.encoding
36 hooke.util.encoding.get_encoding = lambda : 'utf-8'
38 # Override defaultencoding and get_encoding to work around
39 # doctest/unicode limitations:
40 # Doctest: test.unicode_output
41 # ... /usr/lib/python2.6/doctest.py:1475: UnicodeWarning: Unicode
42 # equal comparison failed to convert both arguments to Unicode -
43 # interpreting them as being unequal
46 # http://stackoverflow.com/questions/1733414/how-do-i-include-unicode-strings-in-python-doctests
49 # Unfortunately, the override also makes the codecs.getwriter() code
50 # that this test is supposed to check a no-op. Ah well, guess this
51 # will have to wait for Python 3.