[Python-Dev] Re: testing the Python/C API (was: Re: [Patches] PyObject_GetAttr/PyObject_SetAttr core dumps if given non-string names)

Jeremy Hylton jeremy@beopen.com
Tue, 27 Jun 2000 13:21:28 -0400 (EDT)


I think testing the C API directly is a great idea!  Sorry I missed it
the first time around.

I don't think I understand the suggested approach well enough to
critique it.  Most of the tests need to be written in C, right?  When
an error is encountered, it seems that you should check what the C API
returns *and* what happens at the Python level, i.e. whether the call
sets a Python exception (or clears an existing Python exception).

I guess you ought to show us the code.  I don't think it will go in
Python 1.6, but it sounds like a valuable component for future
releases. 

Jeremy