pearu / sympycore

Automatically exported from code.google.com/p/sympycore
Other
10 stars 1 forks source link

Test coverage of sympycore. #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current test coverage of sympycore is 68%.

By definition, the test coverage is a percentage
of the total number of execution statements in the
package source files that are executed when running the
tests in package tests directories.

Detailed report follows below (only those modules
are shown that have coverage % less that 100):

lines   cov%   module: path.cover
  179    11%   sympy.arithmetic.mpmath.functions2
   58    15%   sympy.arithmetic.mpmath.lib.squareroot
  111    18%   sympy.logic.symbolic.basic
   54    25%   sympy.arithmetic.mpmath.lib.complexop
  488    30%   sympy.arithmetic.mpmath.mpmath
   55    36%   sympy.arithmetic.primetest
  141    39%   sympy.logic.symbolic.operations
  113    39%   sympy.arithmetic.mpmath.lib.convert
  180    40%   sympy.arithmetic.mpmath.lib.functions
   35    45%   sympy.functions.elementary.complexes
   98    48%   sympy.arithmetic.mpmath.lib.constants
  195    51%   sympy.core.utils
  146    62%   sympy.arithmetic.mpmath.lib.util
  148    64%   sympy.arithmetic.number
   35    65%   sympy.arithmetic.sets.basic
  122    68%   sympy.arithmetic.sets.operations
  141    69%   sympy.arithmetic.sets.defined
   68    69%   sympy.arithmetic.basic
   24    70%   sympy.arithmetic.relational
   98    75%   sympy.core.methods
   53    75%   sympy.arithmetic.function
  317    77%   sympy.arithmetic.float
   94    77%   sympy.arithmetic.constants
   73    78%   sympy.functions.elementary.miscellaneous
  156    79%   sympy.logic.sets.operations
   86    79%   sympy.functions.elementary.trigonometric
  226    80%   sympy.core.basic
  322    82%   sympy.arithmetic.mul
  311    82%   sympy.core.function
   57    82%   sympy.arithmetic.methods
  187    83%   sympy.arithmetic.fraction
  176    83%   sympy.arithmetic.interval
   12    83%   sympy.logic.sets.function
   44    84%   sympy.logic.sets.basic
   28    85%   sympy.logic.sets.__init__
  201    86%   sympy.core.sympify
  626    89%   sympy.arithmetic.sets.ranges
  205    89%   sympy.arithmetic.add
   19    89%   sympy.logic.sets.predicate
   91    90%   sympy.functions.elementary.exponential
   49    91%   sympy.logic.sets.set
  208    92%   sympy.arithmetic.integer
  123    92%   sympy.arithmetic.mpmath.lib.floatop
--------------------
TOTAL LINES / COVERAGE: 6272 / 68%

Original issue reported on code.google.com by pearu.peterson on 7 Nov 2007 at 6:52

GoogleCodeExporter commented 9 years ago
I measured also sympy for test coverage, in summary it has:

TOTAL LINES / COVERAGE: 16345 / 76%

Original comment by pearu.peterson on 7 Nov 2007 at 7:52

GoogleCodeExporter commented 9 years ago
Neat tool.

Including the mpmath tests raises the total to 80%.

Original comment by fredrik....@gmail.com on 7 Nov 2007 at 8:17

GoogleCodeExporter commented 9 years ago
How can you make this interesting output? Using py.test?

Original comment by ondrej.c...@gmail.com on 7 Nov 2007 at 8:33

GoogleCodeExporter commented 9 years ago
No, the script is based on trace module.
See
  http://sympycore.googlecode.com/svn/tools/trace_coverage.py

Original comment by pearu.peterson on 7 Nov 2007 at 8:54

GoogleCodeExporter commented 9 years ago
A note when interpreting /tmp/sympy*.cover line number counts.

These are not actually "line number counts" but "trace number counts".
For example, if a source file contains

  l = [i for i in range(5) if smth(i)]

then the corresponding cover file will contain

     5: l = [i for i in range(5) if smth(i)]

The number `5` does not mean that the line
was executed 5 times. It means that 5 traces
were generated for each `smth` call when executing
this line ONCE.

Original comment by pearu.peterson on 8 Nov 2007 at 12:42