summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2012-03-31 22:24:24 +0000
committerRamiro Morales <cramm0@gmail.com>2012-03-31 22:24:24 +0000
commitb41ebcf1b9454bf0905c69594fa2dd1af19e7a60 (patch)
tree83d864f7eb440394721f564d2fb8327673f91da5 /tests
parentf38cf60c35bc9427ad14e261eea40acf91bc2c49 (diff)
Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.
Deprecated in Django 1.3. Removed completely for Django 1.5. Thanks Claude for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/admin_scripts/tests.py10
-rw-r--r--tests/regressiontests/i18n/tests.py24
-rw-r--r--tests/regressiontests/locale/de/LC_MESSAGES/django.mobin497 -> 0 bytes
-rw-r--r--tests/regressiontests/locale/de/LC_MESSAGES/django.po25
-rwxr-xr-xtests/runtests.py2
5 files changed, 1 insertions, 60 deletions
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py
index dd3b0b4385..68ebda064a 100644
--- a/tests/regressiontests/admin_scripts/tests.py
+++ b/tests/regressiontests/admin_scripts/tests.py
@@ -157,16 +157,6 @@ class AdminScriptTestCase(unittest.TestCase):
def assertNoOutput(self, stream):
"Utility assertion: assert that the given stream is empty"
- # HACK: Under Windows, ignore warnings of the form:
- # 'warning: Not loading directory '...\tests\regressiontests\locale': missing __init__.py'
- # It has been impossible to filter them out using other means like:
- # * Using warning.filterwarnings() (for the Python interpreter running the
- # tests) and/or
- # * Using -Wignore:... (for the python interpreter spawned in self.run_test())
- # Instead use a strategy copied from Mercurial's setup.py
- if sys.platform == 'win32':
- stream = [e for e in stream.splitlines()
- if not e.startswith('warning: Not importing directory')]
self.assertEqual(len(stream), 0, "Stream should be empty: actually contains '%s'" % stream)
def assertOutput(self, stream, msg):
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index f0b4a61abb..faed4e55c7 100644
--- a/tests/regressiontests/i18n/tests.py
+++ b/tests/regressiontests/i18n/tests.py
@@ -40,7 +40,6 @@ from .patterns.tests import (URLRedirectWithoutTrailingSlashTests,
URLTranslationTests, URLDisabledTests, URLTagTests, URLTestCaseBase,
URLRedirectWithoutTrailingSlashSettingTests, URLNamespaceTests,
URLPrefixTests, URLResponseTests, URLRedirectTests, PathUnusedTests)
-from .test_warnings import DeprecationWarningTests
here = os.path.dirname(os.path.abspath(__file__))
@@ -869,29 +868,6 @@ class LocalePathsResolutionOrderI18NTests(ResolutionOrderI18NTests):
with self.settings(INSTALLED_APPS=extended_apps):
self.assertUgettext('Time', 'LOCALE_PATHS')
- def test_locale_paths_override_project_translation(self):
- with self.settings(SETTINGS_MODULE='regressiontests'):
- self.assertUgettext('Date/time', 'LOCALE_PATHS')
-
-class ProjectResolutionOrderI18NTests(ResolutionOrderI18NTests):
-
- def setUp(self):
- self.old_settings_module = settings.SETTINGS_MODULE
- settings.SETTINGS_MODULE = 'regressiontests'
- super(ProjectResolutionOrderI18NTests, self).setUp()
-
- def tearDown(self):
- settings.SETTINGS_MODULE = self.old_settings_module
- super(ProjectResolutionOrderI18NTests, self).tearDown()
-
- def test_project_translation(self):
- self.assertUgettext('Date/time', 'PROJECT')
-
- def test_project_override_app_translation(self):
- extended_apps = list(settings.INSTALLED_APPS) + ['regressiontests.i18n.resolution']
- with self.settings(INSTALLED_APPS=extended_apps):
- self.assertUgettext('Date/time', 'PROJECT')
-
class DjangoFallbackResolutionOrderI18NTests(ResolutionOrderI18NTests):
def test_django_fallback(self):
diff --git a/tests/regressiontests/locale/de/LC_MESSAGES/django.mo b/tests/regressiontests/locale/de/LC_MESSAGES/django.mo
deleted file mode 100644
index c53908bf3d..0000000000
--- a/tests/regressiontests/locale/de/LC_MESSAGES/django.mo
+++ /dev/null
Binary files differ
diff --git a/tests/regressiontests/locale/de/LC_MESSAGES/django.po b/tests/regressiontests/locale/de/LC_MESSAGES/django.po
deleted file mode 100644
index 001b595d4d..0000000000
--- a/tests/regressiontests/locale/de/LC_MESSAGES/django.po
+++ /dev/null
@@ -1,25 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: django tests\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-14 17:33+0100\n"
-"PO-Revision-Date: 2011-02-07 13:13-0300\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-
-#: models.py:3
-msgid "Time"
-msgstr "Zeit (PROJECT)"
-
-#: models.py:5
-msgid "Date/time"
-msgstr "Datum/Zeit (PROJECT)"
diff --git a/tests/runtests.py b/tests/runtests.py
index f7db3411cd..257aa3083d 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -25,7 +25,7 @@ REGRESSION_TEST_DIR = os.path.join(RUNTESTS_DIR, REGRESSION_TESTS_DIR_NAME)
TEMP_DIR = tempfile.mkdtemp(prefix='django_')
os.environ['DJANGO_TEST_TEMP_DIR'] = TEMP_DIR
-REGRESSION_SUBDIRS_TO_SKIP = ['locale']
+REGRESSION_SUBDIRS_TO_SKIP = []
ALWAYS_INSTALLED_APPS = [
'django.contrib.contenttypes',