[pypy-commit] pypy default: more small clean-ups and a comment for pyrepl tests
bdkearns
noreply at buildbot.pypy.org
Mon Mar 4 22:12:19 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r62017:a8699a951447
Date: 2013-03-04 16:11 -0500
http://bitbucket.org/pypy/pypy/changeset/a8699a951447/
Log: more small clean-ups and a comment for pyrepl tests
diff --git a/pypy/module/test_lib_pypy/pyrepl/test_basic.py b/pypy/module/test_lib_pypy/pyrepl/test_basic.py
--- a/pypy/module/test_lib_pypy/pyrepl/test_basic.py
+++ b/pypy/module/test_lib_pypy/pyrepl/test_basic.py
@@ -76,6 +76,7 @@
( 'accept', ['cd '])])
+# interrupt uses os.kill which doesn't go through signal handlers on windows
@pytest.mark.skipif("os.name == 'nt'")
def test_interrupt():
with pytest.raises(KeyboardInterrupt):
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
@@ -45,6 +45,7 @@
]
read_spec(spec, HistoricalTestReader)
+
@pytest.mark.skipif("os.name != 'posix'")
def test_signal_failure(monkeypatch):
import os
diff --git a/pypy/module/test_lib_pypy/pyrepl/test_readline.py b/pypy/module/test_lib_pypy/pyrepl/test_readline.py
--- a/pypy/module/test_lib_pypy/pyrepl/test_readline.py
+++ b/pypy/module/test_lib_pypy/pyrepl/test_readline.py
@@ -1,16 +1,12 @@
-import os
+import pytest
-if os.name == 'posix':
+
+ at pytest.mark.skipif("os.name != 'posix'")
+def test_raw_input():
+ import os
+ import pty
from pyrepl.readline import _ReadlineWrapper
-else:
- import pytest
- e = pytest.raises(ImportError, "import pyrepl.readline")
- assert 'termios' in e.value.message
- pytest.skip('pyrepl.readline requires termios')
-
-def test_raw_input():
- import pty
master, slave = pty.openpty()
readline_wrapper = _ReadlineWrapper(slave, slave)
os.write(master, b'input\n')
More information about the pypy-commit
mailing list