mirror of https://github.com/django/django.git
[1.5.x] Skipped deprecation warning test on Python 2.6
Refs #19546. On Python 2.6, DeprecationWarnings are visible by
default.
Backport of e6949373b
from master.
This commit is contained in:
parent
af8e858c15
commit
785ec24720
|
@ -3,6 +3,7 @@ Tests for django test runner
|
||||||
"""
|
"""
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import sys
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
@ -293,11 +294,14 @@ class DeprecationDisplayTest(AdminScriptTestCase):
|
||||||
out, err = self.run_django_admin(args)
|
out, err = self.run_django_admin(args)
|
||||||
self.assertTrue("DeprecationWarning: warning from test" in err)
|
self.assertTrue("DeprecationWarning: warning from test" in err)
|
||||||
|
|
||||||
|
@unittest.skipIf(sys.version_info[:2] == (2, 6),
|
||||||
|
"On Python 2.6, DeprecationWarnings are visible anyway")
|
||||||
def test_runner_deprecation_verbosity_zero(self):
|
def test_runner_deprecation_verbosity_zero(self):
|
||||||
args = ['test', '--settings=regressiontests.settings', '--verbosity=0']
|
args = ['test', '--settings=regressiontests.settings', '--verbosity=0']
|
||||||
out, err = self.run_django_admin(args)
|
out, err = self.run_django_admin(args)
|
||||||
self.assertFalse("DeprecationWarning: warning from test" in err)
|
self.assertFalse("DeprecationWarning: warning from test" in err)
|
||||||
|
|
||||||
|
|
||||||
class AutoIncrementResetTest(TransactionTestCase):
|
class AutoIncrementResetTest(TransactionTestCase):
|
||||||
"""
|
"""
|
||||||
Here we test creating the same model two times in different test methods,
|
Here we test creating the same model two times in different test methods,
|
||||||
|
|
Loading…
Reference in New Issue