summaryrefslogtreecommitdiff
path: root/django/contrib/gis/tests/layermap/tests.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-12-08 11:13:52 +0100
committerClaude Paroz <claude@2xlibre.net>2012-12-08 11:13:52 +0100
commitc91667338a4e774e2819ccf4da852dc7b759bc19 (patch)
tree42a700d237c85ac2b647999d02d3dcd7d8047068 /django/contrib/gis/tests/layermap/tests.py
parent53b879f045f0e55cc8f4bedff67b5a14f3057561 (diff)
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
Diffstat (limited to 'django/contrib/gis/tests/layermap/tests.py')
-rw-r--r--django/contrib/gis/tests/layermap/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/gis/tests/layermap/tests.py b/django/contrib/gis/tests/layermap/tests.py
index a976954d25..470e5be216 100644
--- a/django/contrib/gis/tests/layermap/tests.py
+++ b/django/contrib/gis/tests/layermap/tests.py
@@ -13,13 +13,14 @@ from django.db import router
from django.conf import settings
from django.test import TestCase
from django.utils import unittest
+from django.utils._os import upath
from .models import (
City, County, CountyFeat, Interstate, ICity1, ICity2, Invalid, State,
city_mapping, co_mapping, cofeat_mapping, inter_mapping)
-shp_path = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'data'))
+shp_path = os.path.realpath(os.path.join(os.path.dirname(upath(__file__)), os.pardir, 'data'))
city_shp = os.path.join(shp_path, 'cities', 'cities.shp')
co_shp = os.path.join(shp_path, 'counties', 'counties.shp')
inter_shp = os.path.join(shp_path, 'interstates', 'interstates.shp')