pynguin icon indicating copy to clipboard operation
pynguin copied to clipboard

Equivalent of #pragma: no cover

Open MarineChap opened this issue 4 years ago • 1 comments

Hello, Thank you for open-sourcing this package. I am testing your tool with some of my code. Do you have a way to exclude some codes from the test generation step ? Like #pragma: no cover in the coverage python package.

For example my traceback when encountered some numba functions.

numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
cannot determine Numba type of <class 'pynguin.testcase.execution.executiontracer.ExecutionTracer'>

File "fklab/events/basic_algorithms.py", line 671:
def _bsearchi(vector, key):  # pragma: no cover
    <source elided>

    nmemb = len(vector)
    ^

Thank you !

MarineChap avatar Jan 07 '21 17:01 MarineChap

Currently, there is nothing like this in Pynguin. I am, however, happy to add this to our “things to add” list, which we might add in some future release.

I'll leave this issue open until we have some way of dealing with this—I can, however, not yet estimate a date for such a release.

stephanlukasczyk avatar Jan 08 '21 06:01 stephanlukasczyk