[Python-Dev] Re: how to test behavior wrt an extension type?

Fredrik Lundh fredrik at pythonware.com
Sun Jan 16 12:03:42 CET 2005


Alex Martelli wrote:

> Problem: to write unit tests showing that the current copy.py misbehaves with a classic extension 
> type, I need a classic extension type which defines __copy__ and __deepcopy__ just like /F's 
> cElementTree does.  So, I made one: a small trycopy.c and accompanying setup.py whose only purpose 
> in life is checking that instances of a classic type get copied correctly, both shallowly and 
> deeply.  But now -- where do I commit this extension type, so that the unit tests in test_copy.py 
> can do their job...?

Modules/_testcapimodule.c ?

(I'm using the C api to define an extension type, after all...)

</F> 





More information about the Python-Dev mailing list