diff options
author | Thomas Kluyver <takowl@gmail.com> | 2013-10-21 12:50:11 -0700 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2013-10-21 12:50:11 -0700 |
commit | 8ed644d85fcfa18cc034e884f547696116e54771 (patch) | |
tree | 1d7cb1de48b83178101a075e7493d9881ae4f879 /tests/test_isalive.py | |
parent | dec517d98223cb1c6b04fa06a8da4f69827a8bbd (diff) | |
download | pexpect-git-8ed644d85fcfa18cc034e884f547696116e54771.tar.gz |
Test forcing termination (SIGKILL)
Diffstat (limited to 'tests/test_isalive.py')
-rwxr-xr-x | tests/test_isalive.py | 7 |
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. ''' |