[pypy-svn] r25978 - pypy/dist/pypy/rpython/rctypes/test
arigo at codespeak.net
arigo at codespeak.net
Wed Apr 19 13:18:44 CEST 2006
Author: arigo
Date: Wed Apr 19 13:18:42 2006
New Revision: 25978
Added:
pypy/dist/pypy/rpython/rctypes/test/conftest.py (contents, props changed)
Modified:
pypy/dist/pypy/rpython/rctypes/test/test_import.py
pypy/dist/pypy/rpython/rctypes/test/test_overhead.py
pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
pypy/dist/pypy/rpython/rctypes/test/test_rchar_p.py
pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
pypy/dist/pypy/rpython/rctypes/test/test_rfunc.py
pypy/dist/pypy/rpython/rctypes/test/test_rpointer.py
pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py
pypy/dist/pypy/rpython/rctypes/test/test_rstringbuf.py
pypy/dist/pypy/rpython/rctypes/test/test_rstruct.py
pypy/dist/pypy/rpython/rctypes/test/test_rvoid_p.py
Log:
Use a single conftest.py to detect Pythons where
ctypes is not installed.
Added: pypy/dist/pypy/rpython/rctypes/test/conftest.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/rpython/rctypes/test/conftest.py Wed Apr 19 13:18:42 2006
@@ -0,0 +1,10 @@
+import py
+
+class Directory(py.test.collect.Directory):
+
+ def run(self):
+ try:
+ import ctypes
+ except ImportError:
+ py.test.skip("these tests need ctypes installed")
+ return super(Directory, self).run()
Modified: pypy/dist/pypy/rpython/rctypes/test/test_import.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_import.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_import.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Checks that importing and registering the annotations for rctypes
+Check that importing and registering the annotations for rctypes
doesn't bring in the whole rtyper.
"""
Modified: pypy/dist/pypy/rpython/rctypes/test/test_overhead.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_overhead.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_overhead.py Wed Apr 19 13:18:42 2006
@@ -9,11 +9,6 @@
from pypy.rpython.test.test_llinterp import gengraph
from pypy.translator.backendopt.all import backend_optimizations
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_int, Structure, pointer, POINTER
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rarray.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rarray.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the array implementation.
"""
import py
@@ -12,11 +12,6 @@
import sys
from pypy.rpython.test.test_llinterp import interpret
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_int, c_short, c_char_p, c_char, pointer
from ctypes import ARRAY, POINTER, Structure
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rchar_p.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rchar_p.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rchar_p.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the c_char_p implementation.
"""
import py.test
@@ -12,11 +12,6 @@
import sys
from pypy.rpython.test.test_llinterp import interpret
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_char_p, pointer, Structure
class Test_annotation:
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py Wed Apr 19 13:18:42 2006
@@ -15,12 +15,6 @@
thisdir = py.path.local(__file__).dirpath()
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
-
from ctypes import cdll
from ctypes import POINTER, Structure, c_int, byref, pointer, c_void_p
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rfunc.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rfunc.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rfunc.py Wed Apr 19 13:18:42 2006
@@ -1,3 +1,7 @@
+"""
+Test external function calls.
+"""
+
import py
import sys
import pypy.rpython.rctypes.implementation
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rpointer.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rpointer.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rpointer.py Wed Apr 19 13:18:42 2006
@@ -9,11 +9,6 @@
from pypy.rpython.test.test_llinterp import interpret
from pypy.translator.c.test.test_genc import compile
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_int, c_float, POINTER, pointer, Structure
class Test_annotation:
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rprimitive.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the primitive c_* implementation.
"""
import py.test
@@ -13,11 +13,6 @@
from pypy.rpython.test.test_llinterp import interpret
from pypy.rpython.rarithmetic import r_longlong, r_ulonglong
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_char, c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint
from ctypes import c_long, c_ulong, c_longlong, c_ulonglong, c_float
from ctypes import c_double, c_wchar, c_char_p, pointer
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rstringbuf.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rstringbuf.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rstringbuf.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the create_string_buffer() implementation.
"""
import py.test
@@ -12,11 +12,6 @@
import sys
from pypy.rpython.test.test_llinterp import interpret
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import create_string_buffer
from pypy.rpython.rctypes.astringbuf import StringBufferType
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rstruct.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rstruct.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rstruct.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the Structure implementation.
"""
import py.test
@@ -11,11 +11,6 @@
import sys
from pypy.rpython.test.test_llinterp import interpret
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_int, c_short, Structure, POINTER, pointer, c_char_p
class tagpoint(Structure):
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rvoid_p.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rvoid_p.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rvoid_p.py Wed Apr 19 13:18:42 2006
@@ -1,5 +1,5 @@
"""
-Test the rctypes implementation.
+Test the c_void_p implementation.
"""
import py.test
@@ -11,11 +11,6 @@
from pypy.rpython.lltypesystem import lltype, llmemory
from pypy.rpython.test.test_llinterp import interpret
-try:
- import ctypes
-except ImportError:
- py.test.skip("this test needs ctypes installed")
-
from ctypes import c_void_p, c_int, cast, pointer, POINTER
class Test_annotation:
More information about the Pypy-commit
mailing list