Author: Brian Kearns <[email protected]>
Branch:
Changeset: r63396:200fdf59cb0d
Date: 2013-04-15 18:46 -0400
http://bitbucket.org/pypy/pypy/changeset/200fdf59cb0d/
Log: document this test's workaround better based on mattip's analysis
diff --git a/pypy/module/__pypy__/test/test_signal.py
b/pypy/module/__pypy__/test/test_signal.py
--- a/pypy/module/__pypy__/test/test_signal.py
+++ b/pypy/module/__pypy__/test/test_signal.py
@@ -25,7 +25,7 @@
__pypy__.thread._signals_enter()
def test_enable_signals(self):
- import __pypy__, thread, signal, time
+ import __pypy__, thread, signal, time, sys
def subthread():
try:
@@ -42,12 +42,16 @@
# This is normally called by app_main.py
signal.signal(signal.SIGINT, signal.default_int_handler)
+ if sys.platform.startswith('win'):
+ # Windows seems to hang on _setmode when the first print comes from
+ # a thread, so make sure we've initialized io
+ sys.stdout
+
for i in range(10):
__pypy__.thread._signals_exit()
try:
done = []
interrupted = []
- print 'starting',i
thread.start_new_thread(subthread, ())
for j in range(10):
if len(done): break
@@ -101,7 +105,7 @@
py.test.skip("this is only a test for -A runs on top of pypy")
def test_enable_signals(self):
- import __pypy__, thread, signal, time
+ import __pypy__, thread, time
interrupted = []
lock = thread.allocate_lock()
diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -266,4 +266,3 @@
os_kill = rwin32.os_kill
else:
os_kill = os.kill
-
diff --git a/rpython/rlib/streamio.py b/rpython/rlib/streamio.py
--- a/rpython/rlib/streamio.py
+++ b/rpython/rlib/streamio.py
@@ -89,7 +89,7 @@
def _setfd_binary(fd):
pass
-
+
def fdopen_as_stream(fd, mode, buffering=-1):
# XXX XXX XXX you want do check whether the modes are compatible
# otherwise you get funny results
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit