[pypy-commit] pypy default: skip resource tests when module not available

mattip noreply at buildbot.pypy.org
Tue Apr 16 19:13:20 CEST 2013


Author: mattip <matti.picus at gmail.com>
Branch: 
Changeset: r63415:740f02b99e77
Date: 2013-04-16 19:21 +0300
http://bitbucket.org/pypy/pypy/changeset/740f02b99e77/

Log:	skip resource tests when module not available

diff --git a/pypy/module/test_lib_pypy/test_resource.py b/pypy/module/test_lib_pypy/test_resource.py
--- a/pypy/module/test_lib_pypy/test_resource.py
+++ b/pypy/module/test_lib_pypy/test_resource.py
@@ -1,8 +1,13 @@
 from __future__ import absolute_import
+import py
+try:
+    from lib_pypy import resource
+except ImportError:
+    py.test.skip('no resource module available')
+
 from lib_pypy.ctypes_config_cache import rebuild
 rebuild.rebuild_one('resource.ctc.py')
 
-from lib_pypy import resource
 
 def test_resource():
     x = resource.getrusage(resource.RUSAGE_SELF)


More information about the pypy-commit mailing list