Opened 2 years ago

Closed 18 months ago

Last modified 18 months ago

#21092 closed Bug (fixed)

regressiontests.test_runner.tests.DeprecationDisplayTest.test_runner_deprecation_verbosity_zero() fails with enabled warnings

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

Description

When warnings are enabled (using PYTHONWARNINGS="d" environmental variable), then regressiontests.test_runner.tests.DeprecationDisplayTest.test_runner_deprecation_verbosity_zero() fails.
I use Django 1.5.3.

$ PYTHONPATH="." python3.3 tests/runtests.py --settings=test_sqlite -v0 test_runner.DeprecationDisplayTest.test_runner_deprecation_verbosity_zero
----------------------------------------------------------------------
Ran 1 test in 1.086s

OK
$ PYTHONPATH="." PYTHONWARNINGS="d" python3.3 tests/runtests.py --settings=test_sqlite -v0 test_runner.DeprecationDisplayTest.test_runner_deprecation_verbosity_zero
======================================================================
FAIL: test_runner_deprecation_verbosity_zero (regressiontests.test_runner.tests.DeprecationDisplayTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/Django-1.5.3/tests/regressiontests/test_runner/tests.py", line 368, in test_runner_deprecation_verbosity_zero
    self.assertFalse("DeprecationWarning: warning from test" in err)
AssertionError: True is not False

----------------------------------------------------------------------
Ran 1 test in 1.060s

FAILED (failures=1)

Change History (4)

comment:1 Changed 2 years ago by bmispelon

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

Hi,

Thanks for the detailed report. I can indeed reproduce the issue.

It looks like the breakage was introduced by commit 572a300e56bc0192a9c82565a1d39b96f18bebee and interestingly, it only seems to be present on the 1.5 branch.

comment:2 Changed 2 years ago by Arfrever

  • Cc Arfrever added

comment:3 Changed 18 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In b787ef2dbff957c5b5a64be13f01f985d17ff05b:

Fixed #21092 -- Ensured admin_scripts tests are run with warnings off

comment:4 Changed 18 months ago by Tim Graham <timograham@…>

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