Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django 1.7 - How do I suppress "(1_6.W001) Some project unittests may not execute as expected."?

I have a Django application that has parts originally written in Django 1.2, and the application has been upgraded all the way up to 1.7. After upgrading to 1.7, I'm getting the following warning from python manage.py check:

System check identified some issues:

WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
    HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.

The URL mentioned in the error message does detail the changes that have been made, but it does not give any hint as to why this warning is triggered or how to suppress it. Even though the warning message references Django 1.6, it only started appearing after upgrading to Django 1.7

I have checked that the same number of unit tests is being run under Django 1.7 as was being run under Django 1.6.1.

For those interested, the application in question is an event management system called Kompassi that can be found on Github.

like image 528
Santtu Pajukanta Avatar asked Sep 16 '14 14:09

Santtu Pajukanta


4 Answers

Found a blog post that reveals explicitly specifying

TEST_RUNNER = 'django.test.runner.DiscoverRunner'

in settings.py will stop this warning from occurring.

like image 96
Santtu Pajukanta Avatar answered Oct 15 '22 07:10

Santtu Pajukanta


See https://github.com/django/django/blob/1.7/django/core/checks/compatibility/django_1_6_0.py#L42 for the list of things it checks that gives you this error.

like image 29
xeor Avatar answered Oct 15 '22 08:10

xeor


It looks like the developers have decided to remove this warning:

https://code.djangoproject.com/ticket/23469

like image 9
Arklon Avatar answered Oct 15 '22 07:10

Arklon


You can silence individual system check warnings with the SILENCED_SYSTEM_CHECKS setting.

Regarding your other question about how to find the reasons why this warning was triggered, the only place I could find was by looking at the source code.

like image 9
Vinod Kurup Avatar answered Oct 15 '22 08:10

Vinod Kurup