[Python] Is there any tool to get code coverage of python CLI application thru pytest [closed]

Discussão em 'Python' iniciado por Stack, Fevereiro 20, 2025.

  1. Stack

    Stack Membro Participativo

    I am Automation Engineer. I need to find the code coverage of the python application which we are testing. Application provides CLI interface which we are using in our pytest. CLI application get installed thru pip install. So no direct call or import is happening in the test.

    Is there any tool or process in which I can get code coverage of the application while testing it thru CLI interface.

    Till now I tried coverage.py and pytest-cov but all is giving coverage only if the files are directly imported in the test.

    Continue reading...

Compartilhe esta Página