summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-13 13:29:11 -0400
committerTim Graham <timograham@gmail.com>2013-07-14 13:02:55 -0400
commit2456ffa42c33d63b54579eae0f5b9cf2a8cd3714 (patch)
tree06a8364994fcb6689f39cdf47b0f0372302ee2c5 /tests
parent0d81fd0e5f44432cbd1efb9b0e655116427dee6e (diff)
Fixed #20746 -- Removed Python 2.6 specific code/docs
Diffstat (limited to 'tests')
-rw-r--r--tests/logging_tests/tests.py2
-rw-r--r--tests/queries/tests.py7
-rw-r--r--tests/select_for_update/tests.py14
-rw-r--r--tests/test_runner/tests.py2
4 files changed, 0 insertions, 25 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
index cae2860306..8ba4702aba 100644
--- a/tests/logging_tests/tests.py
+++ b/tests/logging_tests/tests.py
@@ -19,7 +19,6 @@ from admin_scripts.tests import AdminScriptTestCase
from .logconfig import MyEmailBackend
-PYVERS = sys.version_info[:2]
# logging config prior to using filter with mail_admins
OLD_LOGGING = {
@@ -87,7 +86,6 @@ class DefaultLoggingTest(TestCase):
self.logger.error("Hey, this is an error.")
self.assertEqual(output.getvalue(), 'Hey, this is an error.\n')
-@skipUnless(PYVERS > (2,6), "warnings captured only in Python >= 2.7")
class WarningLoggerTests(TestCase):
"""
Tests that warnings output for DeprecationWarnings is enabled
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index 6520eb0176..87d54b637e 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -2148,13 +2148,6 @@ class ConditionalTests(BaseQuerysetTest):
t4 = Tag.objects.create(name='t4', parent=t3)
t5 = Tag.objects.create(name='t5', parent=t3)
-
- # In Python 2.6 beta releases, exceptions raised in __len__ are swallowed
- # (Python issue 1242657), so these cases return an empty list, rather than
- # raising an exception. Not a lot we can do about that, unfortunately, due to
- # the way Python handles list() calls internally. Thus, we skip the tests for
- # Python 2.6.
- @unittest.skipIf(sys.version_info[:2] == (2, 6), "Python version is 2.6")
def test_infinite_loop(self):
# If you're not careful, it's possible to introduce infinite loops via
# default ordering on foreign keys in a cycle. We detect that.
diff --git a/tests/select_for_update/tests.py b/tests/select_for_update/tests.py
index b8a8ad19bf..3204d74224 100644
--- a/tests/select_for_update/tests.py
+++ b/tests/select_for_update/tests.py
@@ -99,15 +99,8 @@ class SelectForUpdateTests(TransactionTestCase):
list(Person.objects.all().select_for_update(nowait=True))
self.assertTrue(self.has_for_update_sql(connection, nowait=True))
- # In Python 2.6 beta and some final releases, exceptions raised in __len__
- # are swallowed (Python issue 1242657), so these cases return an empty
- # list, rather than raising an exception. Not a lot we can do about that,
- # unfortunately, due to the way Python handles list() calls internally.
- # Python 2.6.1 is the "in the wild" version affected by this, so we skip
- # the test for that version.
@requires_threading
@skipUnlessDBFeature('has_select_for_update_nowait')
- @unittest.skipIf(sys.version_info[:3] == (2, 6, 1), "Python version is 2.6.1")
def test_nowait_raises_error_on_block(self):
"""
If nowait is specified, we expect an error to be raised rather
@@ -128,15 +121,8 @@ class SelectForUpdateTests(TransactionTestCase):
self.end_blocking_transaction()
self.assertIsInstance(status[-1], DatabaseError)
- # In Python 2.6 beta and some final releases, exceptions raised in __len__
- # are swallowed (Python issue 1242657), so these cases return an empty
- # list, rather than raising an exception. Not a lot we can do about that,
- # unfortunately, due to the way Python handles list() calls internally.
- # Python 2.6.1 is the "in the wild" version affected by this, so we skip
- # the test for that version.
@skipIfDBFeature('has_select_for_update_nowait')
@skipUnlessDBFeature('has_select_for_update')
- @unittest.skipIf(sys.version_info[:3] == (2, 6, 1), "Python version is 2.6.1")
def test_unsupported_nowait_raises_error(self):
"""
If a SELECT...FOR UPDATE NOWAIT is run on a database backend
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py
index 7765f973ab..72200e40d3 100644
--- a/tests/test_runner/tests.py
+++ b/tests/test_runner/tests.py
@@ -367,8 +367,6 @@ class DeprecationDisplayTest(AdminScriptTestCase):
self.assertIn("DeprecationWarning: warning from test", err)
self.assertIn("DeprecationWarning: module-level warning from deprecation_app", err)
- @unittest.skipIf(sys.version_info[:2] == (2, 6),
- "On Python 2.6, DeprecationWarnings are visible anyway")
def test_runner_deprecation_verbosity_zero(self):
args = ['test', '--settings=settings', '--verbosity=0']
out, err = self.run_django_admin(args)