diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-05-04 14:00:30 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-05-04 14:00:30 +0000 |
| commit | 5211f48ae3cc0d87a260dbf5c3ab8bdae664c4b6 (patch) | |
| tree | 2b50ac06dd30395e53e7649d2a813927ccaeed94 /tests/regressiontests/utils | |
| parent | 7202eb8e3194c6d9c52780526871018205bd0858 (diff) | |
Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/utils')
| -rw-r--r-- | tests/regressiontests/utils/itercompat.py | 15 | ||||
| -rw-r--r-- | tests/regressiontests/utils/tests.py | 9 |
2 files changed, 0 insertions, 24 deletions
diff --git a/tests/regressiontests/utils/itercompat.py b/tests/regressiontests/utils/itercompat.py deleted file mode 100644 index ad79cffcd1..0000000000 --- a/tests/regressiontests/utils/itercompat.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -# Tests of the utils itercompat library. - ->>> from django.utils.itercompat import sorted as compat_sorted - -# Check the replacement version of sorted ->>> x = [5,1,4,2,3] ->>> y = compat_sorted(x) ->>> print y -[1, 2, 3, 4, 5] - ->>> print x -[5, 1, 4, 2, 3] - -"""
\ No newline at end of file diff --git a/tests/regressiontests/utils/tests.py b/tests/regressiontests/utils/tests.py index 8897df6789..cfefc6139a 100644 --- a/tests/regressiontests/utils/tests.py +++ b/tests/regressiontests/utils/tests.py @@ -10,25 +10,16 @@ from django.utils.functional import SimpleLazyObject import timesince import datastructures import datetime_safe -import itercompat import tzinfo from decorators import DecoratorFromMiddlewareTests from functional import FunctionalTestCase -# We need this because "datastructures" uses sorted() and the tests are run in -# the scope of this module. -try: - sorted -except NameError: - from django.utils.itercompat import sorted # For Python 2.3 - # Extra tests __test__ = { 'timesince': timesince, 'datastructures': datastructures, 'datetime_safe': datetime_safe, - 'itercompat': itercompat, 'tzinfo': tzinfo, } |
