Configure coverage.py to use no migrations

我们两清 提交于 2020-01-05 04:31:27

问题


I am using Django Test Without Migrations to make my unit tests faster and I run the tests the following way:

python manage.py test --nomigrations

It significantly improved the speed.

I want to do the same with PyCharm and coverage.py in order to take advantage of visuals PyCharm creates.

I tried to add this to .coveragerc:

[run]

omit =
    */migrations/*

But it turns out that it affects only reports.

How can I do this?


回答1:


Assuming you have professional version with django support:

Click on Edit configurations

Choose Django tests from defaults and add --nomigrations to options input.

If you don't have django support in Pycharm it not that different

Also make sure to use correct python interpreter and refer to awesome doc page.



来源:https://stackoverflow.com/questions/38888628/configure-coverage-py-to-use-no-migrations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!