1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.8.x] Refs #24324 -- Fixed Python 2 test failures when path to Django source contains non-ASCII characters.

Backport of 307c0f299a from master
This commit is contained in:
Tim Graham
2015-02-14 19:47:07 -05:00
parent 09da1b465e
commit 2aa06e439a
9 changed files with 31 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ if not os.path.exists(test_dir):
os.mkdir(test_dir)
open(os.path.join(test_dir, '__init__.py'), 'w').close()
custom_templates_dir = os.path.join(os.path.dirname(__file__), 'custom_templates')
custom_templates_dir = os.path.join(os.path.dirname(upath(__file__)), 'custom_templates')
SYSTEM_CHECK_MSG = 'System check identified no issues'
@@ -117,7 +117,7 @@ class AdminScriptTestCase(unittest.TestCase):
def run_test(self, script, args, settings_file=None, apps=None):
base_dir = os.path.dirname(test_dir)
# The base dir for Django's tests is one level up.
tests_dir = os.path.dirname(os.path.dirname(__file__))
tests_dir = os.path.dirname(os.path.dirname(upath(__file__)))
# The base dir for Django is one level above the test dir. We don't use
# `import django` to figure that out, so we don't pick up a Django
# from site-packages or similar.