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