idlesign / pytest-djangoapp

Nice pytest plugin to help you with Django pluggable application testing.
https://github.com/idlesign/pytest-djangoapp
BSD 3-Clause "New" or "Revised" License
40 stars 6 forks source link

Is there some way to get coverage of django project which testcase is written in tavern? #27

Closed iakirago closed 1 year ago

iakirago commented 2 years ago

I have a django project, which testcase is written in tavern. Run manage.py in the screen before, execute pytest outside the screen, wait until the test execution is completed, use kill -2 to kill the manage.py process, and then use coverage report and coverage html to get coverage and coverage report files.Every testcase is running success, the coverage is 80 percent. If do not run manage.py in screen, the coverage is always 10% when every testcase run success.

I hope to know if there is some way to get the right coverage without running in screen.

idlesign commented 2 years ago

First of all, why do you run manage.py at all? This project runs on top of pytest, not unittest (as in vanilla Django), and for that one don't need any of manage.py machinery.

idlesign commented 1 year ago

Considered closed. Feel free to reopen if required.