summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-11-22 21:16:13 -0800
committerJeff Quast <contact@jeffquast.com>2014-11-22 21:16:13 -0800
commit49e930cafba30409153ec3f6593dfcaf1cf1aaba (patch)
tree4fb6c8d65376dc219a31bf44eadb683668a0cc86 /tests
parent040a715ef4b2b74a6748f503322a6acdf56e8b9e (diff)
parentc40fc13dca5a0596a72d5c26214777f8a2845675 (diff)
downloadpexpect-49e930cafba30409153ec3f6593dfcaf1cf1aaba.tar.gz
Merge pull request #142 from pexpect/failed-str-self
Failure in __str__() before any output.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_repr.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_repr.py b/tests/test_repr.py
new file mode 100644
index 0000000..ce618d4
--- /dev/null
+++ b/tests/test_repr.py
@@ -0,0 +1,26 @@
+""" Test __str__ methods. """
+import pexpect
+
+from . import PexpectTestCase
+
+
+class TestCaseMisc(PexpectTestCase.PexpectTestCase):
+
+ def test_str_spawnu(self):
+ """ Exercise spawnu.__str__() """
+ # given,
+ p = pexpect.spawnu('cat')
+ # exercise,
+ value = str(p)
+ # verify
+ assert isinstance(value, str)
+
+ def test_str_spawn(self):
+ """ Exercise spawn.__str__() """
+ # given,
+ p = pexpect.spawn('cat')
+ # exercise,
+ value = str(p)
+ # verify
+ assert isinstance(value, str)
+