summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2015-06-01 06:42:14 -0400
committerJohn Szakmeister <john@szakmeister.net>2015-06-01 06:42:14 -0400
commit8c75d1d4369228b4fb4b48eba3b46c39f7076dca (patch)
treeb5bd59f486e29cdd32fd0b2a2cb5bc8c14346408
parentf349692bd42edb04252d740c1d401079142eb24b (diff)
downloadnose-8c75d1d4369228b4fb4b48eba3b46c39f7076dca.tar.gz
Skip the multiprocess keyboard interrupt tests on certain platforms.
We need os.setsid() and os.killpg() to be available to use these tests. Skip the tests on platforms that don't have them both.
-rw-r--r--functional_tests/test_multiprocessing/test_keyboardinterrupt.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/functional_tests/test_multiprocessing/test_keyboardinterrupt.py b/functional_tests/test_multiprocessing/test_keyboardinterrupt.py
index 2bcbe73..18c8af1 100644
--- a/functional_tests/test_multiprocessing/test_keyboardinterrupt.py
+++ b/functional_tests/test_multiprocessing/test_keyboardinterrupt.py
@@ -1,3 +1,4 @@
+from nose.exc import SkipTest
from subprocess import Popen,PIPE
import os
import sys
@@ -36,6 +37,9 @@ runner = os.path.join(support, 'fake_nosetest.py')
def keyboardinterrupt(case):
#os.setsid would create a process group so signals sent to the
#parent process will propogates to all children processes
+ if not hasattr(os, 'setsid') or not hasattr(os, 'killpg'):
+ raise SkipTest("OS does not support os.setsid or os.killpg")
+
from tempfile import mktemp
logfile = mktemp()
killfile = mktemp()