diff options
| author | Tim Graham <timograham@gmail.com> | 2015-06-15 09:43:35 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-18 08:36:50 -0400 |
| commit | 7f1168e387dc1db70b6093cfd23a4a6978f48109 (patch) | |
| tree | c3a9f335536fa078d39ad43458feaeac990e3538 /tests | |
| parent | e5cb4e14118f3a508e3bc00ee7cd50bb0f18a61d (diff) | |
Removed support for Python 3.3.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/apps/tests.py | 5 | ||||
| -rw-r--r-- | tests/auth_tests/test_hashers.py | 2 | ||||
| -rw-r--r-- | tests/migrations/test_commands.py | 2 | ||||
| -rw-r--r-- | tests/project_template/test_settings.py | 6 |
4 files changed, 6 insertions, 9 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py index 2837e78aff..c199fa156d 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals import os -import sys import warnings from unittest import skipUnless @@ -367,9 +366,7 @@ class AppConfigTests(SimpleTestCase): AppConfig('label', Stub(__path__=['a', 'b'])) -@skipUnless( - sys.version_info > (3, 3, 0), - "Namespace packages sans __init__.py were added in Python 3.3") +@skipUnless(six.PY3, "Namespace packages sans __init__.py were added in Python 3.3") class NamespacePackageAppTests(SimpleTestCase): # We need nsapp to be top-level so our multiple-paths tests can add another # location for it (if its inside a normal package with an __init__.py that diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py index 993010b2f4..58fbf2a0c7 100644 --- a/tests/auth_tests/test_hashers.py +++ b/tests/auth_tests/test_hashers.py @@ -353,7 +353,7 @@ class TestUtilsHashPass(SimpleTestCase): def test_load_library_importerror(self): PlainHasher = type(str('PlainHasher'), (BasePasswordHasher,), {'algorithm': 'plain', 'library': 'plain'}) - # Python 3.3 adds quotes around module name + # Python 3 adds quotes around module name with six.assertRaisesRegex(self, ValueError, "Couldn't load 'PlainHasher' algorithm library: No module named '?plain'?"): PlainHasher()._load_library() diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 3077dd9e61..58344e50ce 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -843,7 +843,7 @@ class MakeMigrationsTests(MigrationTestBase): content = cmd("0001", migration_name_0001) self.assertIn("dependencies=[\n]", content) - # Python 3.3+ importlib caches os.listdir() on some platforms like + # Python 3 importlib caches os.listdir() on some platforms like # Mac OS X (#23850). if hasattr(importlib, 'invalidate_caches'): importlib.invalidate_caches() diff --git a/tests/project_template/test_settings.py b/tests/project_template/test_settings.py index 8998a844c7..ac115f7dc2 100644 --- a/tests/project_template/test_settings.py +++ b/tests/project_template/test_settings.py @@ -1,11 +1,11 @@ -import sys import unittest from django.test import TestCase +from django.utils import six -@unittest.skipIf(sys.version_info < (3, 3), - 'Python < 3.3 cannot import the project template because ' +@unittest.skipIf(six.PY2, + 'Python 2 cannot import the project template because ' 'django/conf/project_template doesn\'t have an __init__.py file.') class TestStartProjectSettings(TestCase): |
