Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#22602 closed Cleanup/optimization (fixed)

Complete test coverage for makemigrations command

Reported by: Claude Paroz Owned by: Huu Nguyen
Component: Migrations Version: 1.7-beta-2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently the coverage report of the makemigrations management command is only 61%. Let's try our best to extend this to 100% before releasing it.
http://ci.djangoproject.com/job/Django%20Coverage/HTML_Coverage_Report/_var_lib_jenkins_jobs_Django%20Coverage_workspace_django_core_management_commands_makemigrations.html

Not blocking for the RC.

Change History (7)

comment:1 Changed 4 years ago by Andrew Godwin

I question this being marked as a release blocker at all; while I love test coverage as much as the next person, it doesn't find all the bugs, and trying to attain 100% coverage on a command that's very difficult to test because of the fact that it does filesystem operations is just going to slow us down (in that we'll get much better bug finding and reporting from a release and real-world usage than from spending weeks striving for 100% coverage)

Unless there's a convincing argument otherwise, I'd like to demote this from release blocker back down to normal. If we get it before the release, great! If not, let's not delay it further.

Last edited 4 years ago by Andrew Godwin (previous) (diff)

comment:2 Changed 4 years ago by Aymeric Augustin

Severity: Release blockerNormal

100% coverage is rarely achievable (nor useful) for management commands. However, 41% is a bit low ;-)

comment:3 Changed 4 years ago by mardini

Needs tests: set

comment:4 Changed 4 years ago by Huu Nguyen

Owner: changed from nobody to Huu Nguyen
Status: newassigned

comment:5 Changed 4 years ago by Huu Nguyen

Has patch: set

Opened up a pull request for this here. Improved code coverage from 61% to 98%.

comment:6 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In f851a954ac605c4a525761a18d2dcbfb6f8deeca:

Fixed #22602 -- Improved code coverage of makemigrations command tests.

comment:7 Changed 4 years ago by Tim Graham <timograham@…>

In 8462883f9b16810fbc6175d78d7bb13a297debe9:

[1.7.x] Fixed #22602 -- Improved code coverage of makemigrations command tests.

Backport of f851a954ac from master

Note: See TracTickets for help on using tickets.
Back to Top