diff options
Diffstat (limited to 'tests/i18n')
-rw-r--r-- | tests/i18n/project_dir/app_no_locale/test.html | 4 | ||||
-rw-r--r-- | tests/i18n/test_extraction.py | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/i18n/project_dir/app_no_locale/test.html b/tests/i18n/project_dir/app_no_locale/test.html new file mode 100644 index 0000000000..1caebc9e15 --- /dev/null +++ b/tests/i18n/project_dir/app_no_locale/test.html @@ -0,0 +1,4 @@ +A non-Python file will be classed as translatable. + +The temporary file created from this should be removed from the file system if +an error is raised. diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index d6f0e861b0..3ba371f66c 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -765,6 +765,8 @@ class CustomLayoutExtractionTests(ExtractorTests): ) with self.assertRaisesMessage(management.CommandError, msg): management.call_command('makemessages', locale=[LOCALE], verbosity=0) + # Working files are cleaned up on an error. + self.assertFalse(os.path.exists('./app_no_locale/test.html.py')) def test_project_locale_paths(self): self._test_project_locale_paths(os.path.join(self.test_dir, 'project_locale')) |