summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-07-23 12:26:30 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-07-23 12:26:30 (GMT)
commit21b44e0ea2f7af6efca3c8c91e40c820cf296f91 (patch)
tree13e619f8c0f6081d238540a0fb81a009a9f49f7f
parent9ae2cb740ae692bbda5a1728b5843ae84c7e3eb5 (diff)
downloadcpython-21b44e0ea2f7af6efca3c8c91e40c820cf296f91.zip
cpython-21b44e0ea2f7af6efca3c8c91e40c820cf296f91.tar.gz
cpython-21b44e0ea2f7af6efca3c8c91e40c820cf296f91.tar.bz2
Merged revisions 83067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83067 | ronald.oussoren | 2010-07-23 10:50:05 +0100 (Fri, 23 Jul 2010) | 8 lines Workaround for issue 4047: in some configurations of the Crash Reporter on OSX test_subprocess will trigger the reporter. This patch prints a warning when the Crash Reporter will get triggered intentionally, which should avoid confusing people. ........
-rw-r--r--Lib/test/test_subprocess.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index f471c7b..adfb1bf 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -548,6 +548,20 @@ class _SuppressCoreFiles(object):
except (ImportError, ValueError, resource.error):
pass
+ if sys.platform == 'darwin':
+ # Check if the 'Crash Reporter' on OSX was configured
+ # in 'Developer' mode and warn that it will get triggered
+ # when it is.
+ #
+ # This assumes that this context manager is used in tests
+ # that might trigger the next manager.
+ value = subprocess.Popen(['/usr/bin/defaults', 'read',
+ 'com.apple.CrashReporter', 'DialogType'],
+ stdout=subprocess.PIPE).communicate()[0]
+ if value.strip() == b'developer':
+ print "this tests triggers the Crash Reporter, that is intentional"
+ sys.stdout.flush()
+
def __exit__(self, *args):
"""Return core file behavior to default."""
if self.old_limit is None: