[pypy-commit] pypy default: no _curses module on windows, fix issue 1532

mattip noreply at buildbot.pypy.org
Mon Sep 2 22:37:13 CEST 2013


Author: mattip <matti.picus at gmail.com>
Branch: 
Changeset: r66776:9e7bb222d72f
Date: 2013-09-02 23:36 +0300
http://bitbucket.org/pypy/pypy/changeset/9e7bb222d72f/

Log:	no _curses module on windows, fix issue 1532

diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -1,6 +1,9 @@
 """Reimplementation of the standard extension module '_curses' using cffi."""
 
 import sys
+if sys.platform == 'win32':
+    #This module does not exist in windows
+    raise ImportError('No module named _curses')
 from functools import wraps
 
 from cffi import FFI
diff --git a/pypy/module/test_lib_pypy/test_curses.py b/pypy/module/test_lib_pypy/test_curses.py
--- a/pypy/module/test_lib_pypy/test_curses.py
+++ b/pypy/module/test_lib_pypy/test_curses.py
@@ -1,4 +1,8 @@
 import pytest
+import sys
+if sys.platform == 'win32':
+    #This module does not exist in windows
+    pytest.skip('no curses on windows')
 
 # Check that lib_pypy.cffi finds the correct version of _cffi_backend.
 # Otherwise, the test is skipped.  It should never be skipped when run


More information about the pypy-commit mailing list