#11732: add a new suppress_crash_popup() context manager to test.support.

This commit is contained in:
Ezio Melotti 2013-03-05 20:26:17 +02:00
parent 884f0585a4
commit 25a404520d
5 changed files with 40 additions and 4 deletions

View file

@ -44,7 +44,8 @@ class CAPITest(unittest.TestCase):
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_no_FatalError_infinite_loop(self):
p = subprocess.Popen([sys.executable, "-c",
with support.suppress_crash_popup():
p = subprocess.Popen([sys.executable, "-c",
'import _testcapi;'
'_testcapi.crash_no_current_thread()'],
stdout=subprocess.PIPE,