summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-08-29 13:05:22 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-08-29 20:49:25 +0200
commitc2fcba2ac76cdaed5ccf07ae0521a78feb598825 (patch)
tree33a25be06b1072feb27b9b64b8c1fb3f71ef5ab3 /tests
parentdfa712efb8b90c953d850136804ca970fa25b2a5 (diff)
Ensured gen_filenames() yields native strings.
This also fixes a test failure on Python 2 when Django is installed in a non-ASCII path. This problem cannot happen on Python 3.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils_tests/test_autoreload.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py
index 2a643a3b1c..fd477bd268 100644
--- a/tests/utils_tests/test_autoreload.py
+++ b/tests/utils_tests/test_autoreload.py
@@ -90,6 +90,10 @@ class TestFilenameGenerator(SimpleTestCase):
django_mo = os.path.join(django_dir, 'nl', 'LC_MESSAGES', 'django.mo')
self.assertFileNotFound(django_mo)
+ def test_paths_are_native_strings(self):
+ for filename in autoreload.gen_filenames():
+ self.assertIsInstance(filename, str)
+
def test_only_new_files(self):
"""
When calling a second time gen_filenames with only_new = True, only