Hi,
I just ran the test suite with code coverage enabled (-C), and it turns out
that we now have a statement coverage of 87% (see below for details). That's
much better than the 72% we had in March. I think the remaining bits are about
missing tests, mostly regarding compiler errors (of which we definitely have
too few), as well as some debug/trace code. There's also a little bit of dead
code in there.
It's actually interesting to look at the coverage annotated sources after
running:
python runtests.py -vv -C # run test suite in tests/*/ directories
mkdir results
python -m coverage -a -d results Cython/Compiler/*.py
This requires coverage.py installed (or copied into your PYTHONPATH):
http://nedbatchelder.com/code/modules/coverage.html
CALL FOR HELP: If anyone can spare some time and wants to help making Cython
more robust, please look through the annotated sources and check for uncovered
code sections (lines starting with a "!") for which you can write a test,
especially in the files Parsing.py, Nodes.py, ExprNodes.py and ModuleNode.py.
Sometimes its just low hanging fruit, sometimes it's really hard to figure out
what Cython code triggers this code in the compiler. This can actually be
quite entertaining and training, and is a good starting point for learning how
Cython works internally. Check the hacker guide to see how to write these tests.
http://wiki.cython.org/HackerGuide
Thanks for any help!
Stefan
Current coverage:
Name Stmts Exec Cover
-------------------------------------------------------------------
Cython.Compiler.Annotate 111 93 83%
Cython.Compiler.AutoDocTransforms 95 86 90%
Cython.Compiler.Buffer 426 407 95%
Cython.Compiler.Builtin 47 47 100%
Cython.Compiler.CmdLine 88 5 5%
Cython.Compiler.Code 483 457 94%
Cython.Compiler.CodeGeneration 12 12 100%
Cython.Compiler.ControlFlow 113 89 78%
Cython.Compiler.CythonScope 14 14 100%
Cython.Compiler.Errors 89 79 88%
Cython.Compiler.ExprNodes 2603 2282 87%
Cython.Compiler.Future 10 10 100%
Cython.Compiler.Interpreter 24 22 91%
Cython.Compiler.Lexicon 42 3 7%
Cython.Compiler.Main 439 288 65%
Cython.Compiler.ModuleNode 1314 1167 88%
Cython.Compiler.Naming 85 84 98%
Cython.Compiler.Nodes 2698 2371 87%
Cython.Compiler.Optimize 111 107 96%
Cython.Compiler.ParseTreeTransforms 441 368 83%
Cython.Compiler.Parsing 1788 1634 91%
Cython.Compiler.PyrexTypes 771 679 88%
Cython.Compiler.Scanning 310 251 80%
Cython.Compiler.StringEncoding 95 92 96%
Cython.Compiler.Symtab 915 819 89%
Cython.Compiler.Tests 0 0 100%
Cython.Compiler.Tests.TestBuffer 66 34 51%
Cython.Compiler.Tests.TestParseTreeTransforms 32 30 93%
Cython.Compiler.Tests.TestTreeFragment 50 48 96%
Cython.Compiler.Tests.__init__ 0 0 100%
Cython.Compiler.TreeFragment 127 118 92%
Cython.Compiler.TypeSlots 281 277 98%
Cython.Compiler.UtilNodes 48 47 97%
Cython.Compiler.Visitor 129 86 66%
Cython.Compiler.__init__ 0 0 100%
-------------------------------------------------------------------
TOTAL 13857 12106 87%
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev