summaryrefslogtreecommitdiff
path: root/blessings/tests.py
diff options
context:
space:
mode:
authorErik Rose <erik@mozilla.com>2011-11-14 14:56:59 -0800
committerErik Rose <erik@mozilla.com>2011-11-14 14:56:59 -0800
commit76c4894a263717845116464228b96eca48bb71e8 (patch)
tree7737fe157b4c8abb3ea640d282de594c25dccd90 /blessings/tests.py
parentdde2719fbb0b4eb2aedd594b8261785459775d7d (diff)
downloadblessings-76c4894a263717845116464228b96eca48bb71e8.tar.gz
Add an option to force real capability emission even if the output stream is not a tty. Closes #5.
Diffstat (limited to 'blessings/tests.py')
-rw-r--r--blessings/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/blessings/tests.py b/blessings/tests.py
index 6b0c85a..b45116e 100644
--- a/blessings/tests.py
+++ b/blessings/tests.py
@@ -30,6 +30,11 @@ def test_capability_without_tty():
eq_(t.red, '')
+def test_capability_with_forced_tty():
+ t = Terminal(stream=StringIO(), force_styling=True)
+ assert t.save != ''
+
+
def test_parametrization():
"""Test parametrizing a capability."""
eq_(Terminal().cup(3, 4), tparm(tigetstr('cup'), 3, 4))