PyCharm, Django: zero code coverage

后端 未结 4 1069
长情又很酷
长情又很酷 2021-02-19 02:56

PyCharm has a \"Run with Coverage\" action for Django test targets. This runs the tests, but shows zero test coverage (0% files, not covered in the project pane, and all red in

4条回答
  •  情话喂你
    2021-02-19 03:30

    I had a similar issue. I ended up generating xml data using nosetests --cover-xml, but you can also generate an xml from a previous coverage.py run with coverage xml

    Then that report can be conveniently loaded in PyCharm/IDEA from the Analyze -> Show Coverage Data… -> + button and selecting the xml file.

提交回复
热议问题