summaryrefslogtreecommitdiff
path: root/blessings
diff options
context:
space:
mode:
authorErik Rose <erik@mozilla.com>2013-08-31 17:00:41 -0400
committerErik Rose <erik@mozilla.com>2013-09-09 11:26:51 -0400
commitffbe0244bc88e4365bd544bfc0056e3c5be5fdfd (patch)
treeeadd3ae91621c49952c8302c013972b3fa90955c /blessings
parentd19aac02adcf88e9721a8eae4559401cbe82750a (diff)
downloadblessings-ffbe0244bc88e4365bd544bfc0056e3c5be5fdfd.tar.gz
Make test docstrings PEP-8-compliant.
Diffstat (limited to 'blessings')
-rw-r--r--blessings/tests.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/blessings/tests.py b/blessings/tests.py
index aabb497..7dda746 100644
--- a/blessings/tests.py
+++ b/blessings/tests.py
@@ -57,7 +57,8 @@ def test_capability_without_tty():
def test_capability_with_forced_tty():
- """If we force styling, capabilities had better not (generally) be empty."""
+ """If we force styling, capabilities had better not (generally) be
+ empty."""
t = TestTerminal(stream=StringIO(), force_styling=True)
eq_(t.save, unicode_cap('sc'))
@@ -75,7 +76,8 @@ def height_and_width():
def test_stream_attr():
- """Make sure Terminal exposes a ``stream`` attribute that defaults to something sane."""
+ """Make sure Terminal exposes a ``stream`` attribute that defaults to
+ something sane."""
eq_(Terminal().stream, sys.__stdout__)
@@ -197,7 +199,8 @@ def test_number_of_colors_with_tty():
def test_formatting_functions():
"""Test crazy-ass formatting wrappers, both simple and compound."""
t = TestTerminal()
- # By now, it should be safe to use sugared attributes. Other tests test those.
+ # By now, it should be safe to use sugared attributes. Other tests test
+ # those.
eq_(t.bold(u'hi'), t.bold + u'hi' + t.normal)
eq_(t.green('hi'), t.green + u'hi' + t.normal) # Plain strs for Python 2.x
# Test some non-ASCII chars, probably not necessary:
@@ -206,7 +209,8 @@ def test_formatting_functions():
t.bold + t.underline + t.green + t.on_red + u'boo' + t.normal)
# Don't spell things like this:
eq_(t.on_bright_red_bold_bright_green_underline('meh'),
- t.on_bright_red + t.bold + t.bright_green + t.underline + u'meh' + t.normal)
+ t.on_bright_red + t.bold + t.bright_green + t.underline + u'meh' +
+ t.normal)
def test_formatting_functions_without_tty():
@@ -251,13 +255,15 @@ def test_init_descriptor_always_initted():
def test_force_styling_none():
- """If ``force_styling=None`` is passed to the constructor, don't ever do styling."""
+ """If ``force_styling=None`` is passed to the constructor, don't ever do
+ styling."""
t = TestTerminal(force_styling=None)
eq_(t.save, '')
def test_null_callable_string():
- """Make sure NullCallableString tolerates all numbers and kinds of args it might receive."""
+ """Make sure NullCallableString tolerates all numbers and kinds of args it
+ might receive."""
t = TestTerminal(stream=StringIO())
eq_(t.clear, '')
eq_(t.move(1, 2), '')