summaryrefslogtreecommitdiff
path: root/terminator/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'terminator/tests.py')
-rw-r--r--terminator/tests.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/terminator/tests.py b/terminator/tests.py
index 0efe6e9..431238f 100644
--- a/terminator/tests.py
+++ b/terminator/tests.py
@@ -1,4 +1,4 @@
-from cStringIO import StringIO
+from StringIO import StringIO
from curses import tigetstr, tparm
import sys
@@ -52,7 +52,7 @@ def test_location():
# Then rip it away, replacing it with something we can check later:
output = t.stream = StringIO()
-
+
with t.location(3, 4):
output.write('hi')
@@ -60,3 +60,15 @@ def test_location():
tparm(tigetstr('cup'), 4, 3) +
'hi' +
tigetstr('rc'))
+
+
+def test_null_fileno():
+ """Make sure ``Terinal`` works when ``fileno`` is ``None``.
+
+ This simulates piping output to another program.
+
+ """
+ out = stream=StringIO()
+ out.fileno = None
+ t = Terminal(stream=out)
+ eq_(t.save, '')