summaryrefslogtreecommitdiff
path: root/tests/test_isalive.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-10-21 12:50:11 -0700
committerThomas Kluyver <takowl@gmail.com>2013-10-21 12:50:11 -0700
commit8ed644d85fcfa18cc034e884f547696116e54771 (patch)
tree1d7cb1de48b83178101a075e7493d9881ae4f879 /tests/test_isalive.py
parentdec517d98223cb1c6b04fa06a8da4f69827a8bbd (diff)
downloadpexpect-git-8ed644d85fcfa18cc034e884f547696116e54771.tar.gz
Test forcing termination (SIGKILL)
Diffstat (limited to 'tests/test_isalive.py')
-rwxr-xr-xtests/test_isalive.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_isalive.py b/tests/test_isalive.py
index 7810e2e..5386bac 100755
--- a/tests/test_isalive.py
+++ b/tests/test_isalive.py
@@ -90,9 +90,14 @@ class IsAliveTestCase(PexpectTestCase.PexpectTestCase):
if p.isalive():
self.fail ('Child process is not dead. It should be.')
+ def test_forced_terminate(self):
+ p = pexpect.spawn(sys.executable, ['needs_kill.py'])
+ p.expect('READY')
+ res = p.terminate(force=True)
+ assert res, res
+
### Some platforms allow this. Some reset status after call to waitpid.
def test_expect_isalive_consistent_multiple_calls (self):
-
'''This tests that multiple calls to isalive() return same value.
'''