ext module testing modes
Hi Armin, On Sat, Apr 15, 2006 at 13:02 +0200, arigo@codespeak.net wrote:
Author: arigo Date: Sat Apr 15 13:02:14 2006 New Revision: 25852
Added: pypy/dist/pypy/rpython/rctypes/socketmodule/test_addr.py (contents, props changed) Modified: pypy/dist/pypy/rpython/rctypes/socketmodule/_socket.py pypy/dist/pypy/rpython/rctypes/socketmodule/ctypes_socket.py Log: Very incomplete implementation of getaddrinfo(), with a test (only works on on-line machines so far). The idea is that rctypes should now support all ctypes constructions that were necessary. I will start a regular mixed-module _socket based on this, but first we need to figure out how to best test mixed-modules based on ctypes -- ideally, they should be testable and compilable without the rest of the PyPy interpreter...
regarding py.test support: I think eventually we may have the following testing distinctions regarding ext modules: - test mixed module with std objspace (running on top of cpython) (current default) - test mixed module with cpy-objspace connected to CPython runtime via rctypes - test mixed module on top of pypy-c I guess the second testing mode could be specified by "--objspace=cpy" and for the third we may simply allow to specify "--appdirect" which would trigger application level tests to run directly on the executable instead through pypy interpreter indirection. (with "--exec=/path/to/executable" you can already point to pypy-c but PyPy does not support enough for py.test to run this way). makes sense? holger
Hi Holger, On Sat, Apr 15, 2006 at 03:10:05PM +0200, holger krekel wrote:
- test mixed module with std objspace (running on top of cpython) (current default)
- test mixed module with cpy-objspace connected to CPython runtime via rctypes
- test mixed module on top of pypy-c
makes sense?
Sure. Note that for testing we could also reintroduce a trivial object space -- ouch! wait! don't hit! I think this would be far simpler than the previous "trivial" space because it wouldn't try to be nice with the PyPy interpreter at all; it would always use the underlying interpreter. For the same reason I expect the CPyObjSpace to look like our initial trivial object space as well, without growing all the complexities. Hopefully. Armin
participants (2)
-
Armin Rigo
-
hpk@trillke.net