diff options
author | Jeff Quast <contact@jeffquast.com> | 2015-12-12 17:24:39 -0800 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2015-12-12 17:24:39 -0800 |
commit | 17f1360c69525a0dd878e005d0c147567bb82ef6 (patch) | |
tree | 31b050a54e3433a8790b958b703fbc83ad0473b7 /tests | |
parent | 3451858cf0061aff06c8a82fdc628270336cbc8c (diff) | |
download | pexpect-git-17f1360c69525a0dd878e005d0c147567bb82ef6.tar.gz |
ensure __str__ method works when subclassed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_repr.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_repr.py b/tests/test_repr.py index ce618d4..75ed8a9 100644 --- a/tests/test_repr.py +++ b/tests/test_repr.py @@ -24,3 +24,14 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase): # verify assert isinstance(value, str) + def test_str_before_spawn(self): + """ Exercise derived spawn.__str__() """ + # given, + child = pexpect.spawn(None, None) + child.closed = False + try: + child.expect('alpha', timeout=0.1) + except pexpect.TIMEOUT: + pass + else: + assert False, 'TIMEOUT exception expected. No exception aised.' |