Ned Deily added the comment:

OK, that explains the failure. You must have set the OS X crash reporter 
default to "Developer" mode on that machine at some point.  In that case, code 
that is now in the SuppressCrashReport context manager in 
Lib/test/support/__init__.py checks for that setting by "shelling out" on OS X 
to /usr/bin/defaults for each use of the context manager in tests and, if set 
to "Developer", outputs that message to stdout.  So that will interfere with a 
test like this where the contents of stdout is used as part of the test.  But 
the code seems problematic in a couple of other respects.  You can still get 
some crash popups even if the preference is not set to Developer.  Also if the 
preference has never been set, you get a spurious error message to stderr for 
each test case that uses the context manager:

2015-05-14 14:34:44.185 defaults[90018:2205666]
The domain/default pair of 
(/Users/nad/Library/Preferences/com.apple.CrashReporter, DialogType) does not 
exist

My initial reaction without full testing of the effects of the Crash Reporter 
settings would be to: (1) not print a message to stdout since none of the other 
non-OS X cases do; (2) cache the results of the initial /usr/bin/defaults call. 
 As a workaround, you could comment out the print.

https://developer.apple.com/library/mac/technotes/tn2004/tn2123.html

----------
nosy: +ronaldoussoren
stage:  -> needs patch
title: test_urandom_fd_reopened failure on Mac OS X -> test_urandom_fd_reopened 
failure if OS X crash reporter default set to Developer

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24157>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to