Commits

Brian Kearns committed a8699a9

more small clean-ups and a comment for pyrepl tests

Comments (0)

Files changed (3)

pypy/module/test_lib_pypy/pyrepl/test_basic.py

                ( '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):

pypy/module/test_lib_pypy/pyrepl/test_bugs.py

     ]
     read_spec(spec, HistoricalTestReader)
 
+
 @pytest.mark.skipif("os.name != 'posix'")
 def test_signal_failure(monkeypatch):
     import os

pypy/module/test_lib_pypy/pyrepl/test_readline.py

-import os
+import pytest
 
-if os.name == 'posix':
+
+@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')