Doctesting a cython file

asked 2012-12-03 15:03:26 +0200

updated 2012-12-03 15:12:05 +0200

Bonjour à tous,

I have a cython file stab.pyx, which uses a C file libstab.c, located in the same directory. Everything works fine with:

sage: load stab.pyx
Compiling ./stab.pyx...

and I can use classes, methods and so on defined in my file. It works fine too in notebook, I just need to give the full access path for loading (compiling) this file.

Today I had the strange idea of adding some documentation (wow) and doctests. Again the notebook displays my doc with nice formatting when I use the usual '?'. The problem is that I can't verify doctests with:

sage -t stab.pyx

Sage complains gcc fails because it does'nt find libstab.c. What's a simple way for automatic doctesting this file ?

Amitiés [JB]

edit retag flag offensive close merge delete