Commits

Brian Kearns  committed cfa3750

clean up pyrepl test skips

  • Participants
  • Parent commits 2951995

Comments (0)

Files changed (3)

File pypy/module/test_lib_pypy/pyrepl/test_basic.py

 # RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 # CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import os
 import pytest
 from .infrastructure import read_spec
 

File pypy/module/test_lib_pypy/pyrepl/test_bugs.py

 
 import pytest
 
-import os
-if os.name == 'nt':
-    pytest.skip('pyrepl does not work properly on windows')
 
 class HistoricalTestReader(HistoricalReader, BaseTestReader):
     pass
     ]
     read_spec(spec, HistoricalTestReader)
 
+@pytest.mark.skipif("os.name != 'posix'")
 def test_signal_failure(monkeypatch):
     import os
     import pty

File pypy/module/test_lib_pypy/pyrepl/test_readline.py

 import os
-import pytest
 
-if os.name == 'nt':
-    pytest.skip('No pyrepl.readline in windows, requires termios')
-
-from pyrepl.readline import _ReadlineWrapper
-
-import pty
+if os.name == 'posix':
+    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')