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

Trent Mick trentm@activestate.com
Tue, 27 Jun 2000 09:57:38 -0700


On Mon, Jun 26, 2000 at 01:18:28PM -0400, Jeremy Hylton wrote:
> Ok.  I was looking for a test case to include in the test suite.  I've
> made the change, but it looks like it will have to go without an
> accompanying test.


I asked the question a while back if it would reasonable/useful/popular to
have a mechanism where parts of the Python/C Api could be tested directly.

My proposal used an extension module _testmodule (although I made it a core
module on UN*X it should not bog down the core) which exported a bunch o'
test_* routines that tested specific parts of the Python/C API. A
test_internal.py module would be added to the std regression test suite that
would import this module and call each of the exported test_* routines in
turn. This would allow things like the _GetAttr/_SetAttr behaviour to be tested.

Anybody have any opinions?


Trent

p.s. I have a patch largely (all except the above menntion limitation) ready
for this, including some tests that I used for my 64-bit porting stuff. 


-- 
Trent Mick
trentm@activestate.com