Simon King wrote:
> Hi Bjarke!
> 
> On 28 Jun., 00:17, Bjarke Hammersholt Roune <bjarke.ro...@gmail.com>
> wrote:
>> How do I doctest Cython functions taking C data structures? I don't
>> seem to be able to construct Cython data in the doctest.
> 
> Once, someone gave me the hint to create a function that takes usual
> Python/Cython classes as input but internally works with C data
> structures. Then, this function  can be used in doc tests.
> 
> Note that in the good old times it was possible to test a .pyx-file
> just as a text file. Nowadays, testing a pyx-file "foo.pyx" requires
> that "attach foo.pyx" would work. If this is not the case, e.g., since
> foo.pyx depends on external C-structures, then currently testing
> foo.pyx isn't easy.

I'm not sure what you refer to in the latter paragraph (perhaps it's 
something Sage-specific thing I don't know much about), but a workaround 
for the doctest vs. Cython-issue can be found here:

http://wiki.cython.org/FAQ#HowcanIrundoctestsinCythoncode.28pyxfiles.29.3F


-- 
Dag Sverre

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to