Jahongir Rahmonov
Jahongir Rahmonov

Reputation: 13723

Configure coverage.py to use no migrations

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?

Upvotes: 2

Views: 1036

Answers (1)

valignatev
valignatev

Reputation: 6316

Assuming you have professional version with django support: enter image description here

Click on Edit configurations

enter image description here

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.

Upvotes: 2

Related Questions