diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-12-08 11:13:52 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-12-08 11:13:52 +0100 |
| commit | c91667338a4e774e2819ccf4da852dc7b759bc19 (patch) | |
| tree | 42a700d237c85ac2b647999d02d3dcd7d8047068 /tests/regressiontests/i18n/commands/compilation.py | |
| parent | 53b879f045f0e55cc8f4bedff67b5a14f3057561 (diff) | |
Fixed #19357 -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
Diffstat (limited to 'tests/regressiontests/i18n/commands/compilation.py')
| -rw-r--r-- | tests/regressiontests/i18n/commands/compilation.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/regressiontests/i18n/commands/compilation.py b/tests/regressiontests/i18n/commands/compilation.py index c6ab77941b..2944469110 100644 --- a/tests/regressiontests/i18n/commands/compilation.py +++ b/tests/regressiontests/i18n/commands/compilation.py @@ -4,9 +4,10 @@ from django.core.management import call_command, CommandError from django.test import TestCase from django.test.utils import override_settings from django.utils import translation, six +from django.utils._os import upath from django.utils.six import StringIO -test_dir = os.path.abspath(os.path.dirname(__file__)) +test_dir = os.path.abspath(os.path.dirname(upath(__file__))) class MessageCompilationTests(TestCase): @@ -25,9 +26,9 @@ class PoFileTests(MessageCompilationTests): def test_bom_rejection(self): os.chdir(test_dir) - with six.assertRaisesRegex(self, CommandError, - "file has a BOM \(Byte Order Mark\)"): + with self.assertRaises(CommandError) as cm: call_command('compilemessages', locale=self.LOCALE, stderr=StringIO()) + self.assertIn("file has a BOM (Byte Order Mark)", cm.exception.args[0]) self.assertFalse(os.path.exists(self.MO_FILE)) |
