|Issue 129:||Improve test coverage|
|2 people starred this issue and may be notified of changes.||Back to list|
runtests.py -coverage Lack of coverage quite often means bugs (and usually trivial bugs, so improving coverage gives good payoff for little work). 24 75% mpmath.__init__ (c:\source\mp\trunk\mpmath\__init__.py) 520 85% mpmath.calculus (c:\source\mp\trunk\mpmath\calculus.py) 998 88% mpmath.elliptic (c:\source\mp\trunk\mpmath\elliptic.py) 888 95% mpmath.functions (c:\source\mp\trunk\mpmath\functions.py) 667 96% mpmath.gammazeta (c:\source\mp\trunk\mpmath\gammazeta.py) 306 86% mpmath.identification (c:\source\mp\trunk\mpmath\identification.py) 1028 90% mpmath.libelefun (c:\source\mp\trunk\mpmath\libelefun.py) 613 92% mpmath.libhyper (C:\source\mp\trunk\mpmath\libhyper.py) 465 95% mpmath.libmpc (C:\source\mp\trunk\mpmath\libmpc.py) 958 72% mpmath.libmpf (C:\source\mp\trunk\mpmath\libmpf.py) 252 97% mpmath.libmpi (C:\source\mp\trunk\mpmath\libmpi.py) 236 96% mpmath.linalg (c:\source\mp\trunk\mpmath\linalg.py) 324 93% mpmath.matrices (c:\source\mp\trunk\mpmath\matrices.py) 738 86% mpmath.mptypes (c:\source\mp\trunk\mpmath\mptypes.py) 92 89% mpmath.odes (c:\source\mp\trunk\mpmath\odes.py) 465 81% mpmath.optimization (c:\source\mp\trunk\mpmath\optimization.py) 268 83% mpmath.quadrature (c:\source\mp\trunk\mpmath\quadrature.py) 100 79% mpmath.settings (C:\source\mp\trunk\mpmath\settings.py) 105 9% mpmath.visualization (c:\source\mp\trunk\mpmath\visualization.py) Some modules are reported to have lower coverage than in reality because they contain gmpy/non-gmpy-specific code. It should be easy to write some tests that always test the non-gmpy code when in gmpy mode. Some other code is only meant to be run interactively, but could still be tested (e.g. for "verbose=True" code by temporarily redirecting stdout to stringio). Also, some code reported as uncovered here is already covered by doctests. Nevertheless, near-100% coverage by runtests.py should be possible with a little work.
Feb 5, 2009
Nice work! When did you run the doctests the last time? I suspect many of them are broken.
Feb 5, 2009
A couple of days ago. Running them now, all module tests pass. There are some failures in the .txt docs due to the change of mpi.__repr__.
|► Sign in to add a comment|