Skip to content

coverage does not account for numba decorators #849

Open
@pbacon42

Description

@pbacon42

In fact the problem is related to Sonarqube (SQ) which in a way or another relies on reports produced by the coverage library. I noticed that functions decorated with numba decorators (jit, njit) are ignored when running SQ. Those functions are well tested but they are not taken into account when estimating the coverage.

I read on the coverage documentation there is the --timid flag but it has no effect (besides making the scan slower).

I am running Python3.6.3 and numba version is 0.43.1. The structure of my code is as follows:

integrate_tools.py:
`from numba import njit

@njit
def integrate(f, a, b):
# do numerical integration here...
`

test_integration_tools.py:
`import integrate_tools as it

def test_integrate():
# call integrate here...
`

Please let me know if I forgot any information

Metadata

Metadata

Assignees

No one assigned

    Labels

    exoticUnusual execution environment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions