summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-05-26 21:03:56 +0000
committerRamiro Morales <cramm0@gmail.com>2011-05-26 21:03:56 +0000
commitc3db0b058c832f6f275f97d8e2e40c8e6f9f7e99 (patch)
treee0020ff43d0e6c5c87e56c7fa793ab84a5c6fa3f
parent723b620c7edab47561d6387c7db3ace2f3b7aa16 (diff)
Modified a couple of i18n regression tests to make them run under Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/i18n/commands/extraction.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/regressiontests/i18n/commands/extraction.py b/tests/regressiontests/i18n/commands/extraction.py
index fa3df5b9d2..a5b01f3617 100644
--- a/tests/regressiontests/i18n/commands/extraction.py
+++ b/tests/regressiontests/i18n/commands/extraction.py
@@ -82,7 +82,10 @@ class BasicExtractorTests(ExtractorTests):
try:
management.call_command('makemessages', locale=LOCALE, verbosity=0)
except SyntaxError, e:
- self.assertEqual(str(e), 'Translation blocks must not include other block tags: blocktrans (file templates/template_with_error.html, line 3)')
+ self.assertRegexpMatches(
+ str(e),
+ r'Translation blocks must not include other block tags: blocktrans \(file templates[/\\]template_with_error\.html, line 3\)'
+ )
finally:
os.remove('./templates/template_with_error.html')
os.remove('./templates/template_with_error.html.py') # Waiting for #8536 to be fixed
@@ -105,7 +108,8 @@ class IgnoredExtractorTests(ExtractorTests):
def test_ignore_option(self):
os.chdir(self.test_dir)
- management.call_command('makemessages', locale=LOCALE, verbosity=0, ignore_patterns=['ignore_dir/*'])
+ pattern1 = os.path.join('ignore_dir', '*')
+ management.call_command('makemessages', locale=LOCALE, verbosity=0, ignore_patterns=[pattern1])
self.assertTrue(os.path.exists(self.PO_FILE))
po_contents = open(self.PO_FILE, 'r').read()
self.assertMsgId('This literal should be included.', po_contents)