diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-20 11:17:39 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-20 11:17:39 (GMT) |
commit | 4a5dd5c576790256b1de25e8896c332a5e125637 (patch) | |
tree | a847af14a57fa54bd0ecaec047b0d1f243b2e963 /Lib/test/test_threading.py | |
parent | 657977ef778c8fc080ce553fcbc3cc603518a111 (diff) | |
download | cpython-4a5dd5c576790256b1de25e8896c332a5e125637.zip cpython-4a5dd5c576790256b1de25e8896c332a5e125637.tar.gz cpython-4a5dd5c576790256b1de25e8896c332a5e125637.tar.bz2 |
Merged revisions 84909-84913 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84909 | antoine.pitrou | 2010-09-20 00:46:05 +0200 (lun., 20 sept. 2010) | 3 lines
Try to fix test_subprocess on "x86 debian parallel 3.x" buildbot
........
r84910 | antoine.pitrou | 2010-09-20 01:06:53 +0200 (lun., 20 sept. 2010) | 3 lines
Try to make signal-sending tests in test_subprocess more robust on slow machines
........
r84911 | antoine.pitrou | 2010-09-20 01:28:30 +0200 (lun., 20 sept. 2010) | 3 lines
Make error more explicit in test_finalize_with_trace
........
r84912 | antoine.pitrou | 2010-09-20 02:12:19 +0200 (lun., 20 sept. 2010) | 3 lines
Try to fix buildbot failure (#9902)
........
r84913 | antoine.pitrou | 2010-09-20 03:33:21 +0200 (lun., 20 sept. 2010) | 3 lines
Try a more robust implementation of _kill_process
........
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 71135cc..713ea9c 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -279,7 +279,7 @@ class ThreadTests(unittest.TestCase): # Issue1733757 # Avoid a deadlock when sys.settrace steps into threading._shutdown import subprocess - rc = subprocess.call([sys.executable, "-c", """if 1: + p = subprocess.Popen([sys.executable, "-c", """if 1: import sys, threading # A deadlock-killer, to prevent the @@ -299,9 +299,14 @@ class ThreadTests(unittest.TestCase): return func sys.settrace(func) - """]) + """], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + rc = p.returncode self.assertFalse(rc == 2, "interpreted was blocked") - self.assertTrue(rc == 0, "Unexpected error") + self.assertTrue(rc == 0, + "Unexpected error: " + ascii(stderr)) def test_join_nondaemon_on_shutdown(self): # Issue 1722344 |