Opened 11 years ago

Closed 11 years ago

#21416 closed Uncategorized (needsinfo)

admin_scripts.tests.ManageValidate.test_app_with_import() fails with enabled warnings

Reported by: Arfrever Owned by: nobody
Component: Testing framework Version: 1.6
Severity: Normal Keywords:
Cc: Arfrever Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

admin_scripts.tests.ManageValidate.test_app_with_import() fails, when warnings are enabled (using PYTHONWARNINGS="d,i::ImportWarning" environmental variable).
This failure occurs in Django 1.6 and does not occur in Django 1.5.5.

$ PYTHONPATH="." PYTHONWARNINGS="d,i::ImportWarning" python2.7 tests/runtests.py --settings=test_sqlite -v1 admin_scripts
Creating test database for alias 'default'...
Creating test database for alias 'other'...
........................................................................................................................................F..................
======================================================================
FAIL: test_app_with_import (admin_scripts.tests.ManageValidate)
manage.py validate does not raise errors when an app imports a base class that itself has an abstract base
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/Django-1.6/tests/admin_scripts/tests.py", line 1094, in test_app_with_import
    self.assertNoOutput(err)
  File "/tmp/Django-1.6/tests/admin_scripts/tests.py", line 182, in assertNoOutput
    self.assertEqual(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
AssertionError: 282 != 0 : Stream should be empty: actually contains '/tmp/Django-1.6/django/contrib/comments/__init__.py:9: PendingDeprecationWarning: django.contrib.comments is deprecated and will be removed before Django 1.8.
  warnings.warn("django.contrib.comments is deprecated and will be removed before Django 1.8.", PendingDeprecationWarning)
'

----------------------------------------------------------------------
Ran 155 tests in 211.841s

FAILED (failures=1)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

Change History (3)

comment:1 by Arfrever, 11 years ago

Cc: Arfrever added

comment:2 by Tim Graham, 11 years ago

I can reproduce this. May I ask why you want to run the tests in this particular way?

comment:3 by Tim Graham, 11 years ago

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top