summaryrefslogtreecommitdiff
path: root/blessings
diff options
context:
space:
mode:
authorVitja Makarov <vitja.makarov@gmail.com>2013-08-26 08:55:48 +0400
committerVitja Makarov <vitja.makarov@gmail.com>2013-08-26 08:55:48 +0400
commit1e3454aec2e987e17981f0ae268521da3ef50183 (patch)
tree4ea291570d3d2d08a9d9942cacb035c4fbbb5e7c /blessings
parent9b0256e2b3d70b2c4d529cb8888d73a1538000cc (diff)
downloadblessings-1e3454aec2e987e17981f0ae268521da3ef50183.tar.gz
Add testcase for NullCallableString
Diffstat (limited to 'blessings')
-rw-r--r--blessings/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/blessings/tests.py b/blessings/tests.py
index a885c65..85855d8 100644
--- a/blessings/tests.py
+++ b/blessings/tests.py
@@ -254,3 +254,12 @@ def test_force_styling_none():
"""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():
+ """With no tty NullCallableString is used."""
+ t = TestTerminal(stream=StringIO())
+ eq_(t.bold('hello, world'), 'hello, world')
+ eq_(t.clear(), '')
+ eq_(t.move(1, 2), '')
+ eq_(t.move_x(1), '')