se2p / pynguin

The PYthoN General UnIt Test geNerator is a test-generation tool for Python
https://www.pynguin.eu
MIT License
1.24k stars 75 forks source link

Equivalent of #pragma: no cover #4

Open MarineChap opened 3 years ago

MarineChap commented 3 years ago

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 !

stephanlukasczyk commented 3 years ago

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.