Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified a couple of i18n regression tests to make them run under Win…

…dows.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c3db0b058c832f6f275f97d8e2e40c8e6f9f7e99 1 parent 723b620
@ramiro ramiro authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 tests/regressiontests/i18n/commands/extraction.py
View
8 tests/regressiontests/i18n/commands/extraction.py
@@ -82,7 +82,10 @@ def test_extraction_error(self):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.