Author: Brian Kearns <[email protected]>
Branch:
Changeset: r61121:514fb4ea981d
Date: 2013-02-12 03:50 -0500
http://bitbucket.org/pypy/pypy/changeset/514fb4ea981d/
Log: add a test for c17aa572ce36
diff --git a/pypy/module/test_lib_pypy/pyrepl/test_bugs.py
b/pypy/module/test_lib_pypy/pyrepl/test_bugs.py
--- a/pypy/module/test_lib_pypy/pyrepl/test_bugs.py
+++ b/pypy/module/test_lib_pypy/pyrepl/test_bugs.py
@@ -44,3 +44,24 @@
('accept', [''])
]
read_spec(spec, HistoricalTestReader)
+
+def test_signal_failure(monkeypatch):
+ import os
+ import pty
+ import signal
+ from pyrepl.unix_console import UnixConsole
+
+ def failing_signal(a, b):
+ raise ValueError
+
+ mfd, sfd = pty.openpty()
+ try:
+ c = UnixConsole(sfd, sfd)
+ c.prepare()
+ c.restore()
+ monkeypatch.setattr(signal, 'signal', failing_signal)
+ c.prepare()
+ c.restore()
+ finally:
+ os.close(mfd)
+ os.close(sfd)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit