mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user